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

feat: add is_nan and is_finite for duckdb, is_nan for pyspark #1825

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

FBruzzesi
Copy link
Member

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • ✨ Feature
  • πŸ› Bug Fix
  • πŸ”§ Optimization
  • πŸ“ Documentation
  • βœ… Test
  • 🐳 Other

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

@FBruzzesi FBruzzesi added the enhancement New feature or request label Jan 19, 2025
Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

thanks @FBruzzesi ! just a couple of questions but the logic looks good

tests/expr_and_series/is_finite_test.py Outdated Show resolved Hide resolved
Comment on lines -32 to +30
float=nw.col("int").cast(nw.Float64), float_na=nw.col("int") / nw.col("int")
float=nw.col("int").cast(nw.Float64), float_na=nw.col("int") ** 0.5
Copy link
Member

Choose a reason for hiding this comment

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

why does this need changing?

Copy link
Member Author

@FBruzzesi FBruzzesi Jan 19, 2025

Choose a reason for hiding this comment

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

Sorry I forgot to comment, and it's a fun one.

Apparently, zero division leads to Null, while the square root of -1 is NaN in pyspark πŸ˜…

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

thanks @FBruzzesi

@MarcoGorelli MarcoGorelli merged commit a55ff89 into main Jan 20, 2025
21 of 24 checks passed
@MarcoGorelli MarcoGorelli deleted the feat/duckdb-pyspark-is-nan branch January 20, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants