Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixing for hasnans when non-DoubleType. #1681

Merged
merged 6 commits into from
Jul 31, 2020

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Jul 29, 2020

ks.Series.hasnans and ks.Index.hasnans seems not work properly for non-DoubleType.

>>> ks.Series([True, True, np.nan]).hasnans
Traceback (most recent call last):
...
pyspark.sql.utils.AnalysisException: cannot resolve 'isnan(`0`)' due to data type mismatch: argument 1 requires (double or float) type, however, '`0`' is of boolean type.;;
'Aggregate [max((isnull(0#12) OR isnan(0#12))) AS max(((0 IS NULL) OR isnan(0)))#21]
+- Project [__index_level_0__#11L, 0#12, monotonically_increasing_id() AS __natural_order__#15L]
   +- LogicalRDD [__index_level_0__#11L, 0#12], false

This PR fixed it.

databricks/koalas/base.py Outdated Show resolved Hide resolved
@itholic itholic changed the title Bug fixing for hasnans with BooleanType Bug fixing for hasnans when non-DoubleType. Jul 30, 2020
Copy link
Collaborator

@ueshin ueshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, LGTM.

databricks/koalas/base.py Outdated Show resolved Hide resolved
Copy link
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HyukjinKwon HyukjinKwon merged commit fb2eedc into databricks:master Jul 31, 2020
@itholic itholic deleted the bug_hasnans branch July 31, 2020 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants