-
Notifications
You must be signed in to change notification settings - Fork 485
feat(datafusion): push down isnan over NaN-preserving numeric expressions #2592
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
Open
huan233usc
wants to merge
13
commits into
apache:main
Choose a base branch
from
huan233usc:fix/2154-isnan-complex-arg-pushdown
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+196
−14
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7470860
feat(datafusion): push down isnan over NaN-preserving numeric express…
huan233usc a10973d
refactor(datafusion): clarify NaN-preserving arithmetic resolution
huan233usc b289e4f
refactor(datafusion): defer abs scalar-function arg to a follow-up
huan233usc b33d08d
docs(datafusion): add TODO for deferred scalar-function arg support
huan233usc 4c92291
feat(datafusion): support abs argument and fold literal helper
huan233usc b18874f
refactor(datafusion): use ScalarValue::cast_to for literal f64 extrac…
huan233usc 3675bd1
refactor(datafusion): build IsNan via Reference::is_nan builder
huan233usc 8814873
refactor(datafusion): collapse literal helpers into a single finite_l…
huan233usc a7e81bc
docs(datafusion): clarify IEEE-754 rationale in arithmetic comments
huan233usc 517f91b
docs(datafusion): note why two-column arithmetic is not resolved for …
huan233usc 674fb44
docs(datafusion): link two-column arithmetic follow-up to issue 2154
huan233usc 366c472
docs(datafusion): use TODO(issue-2154) form for two-column arithmetic…
huan233usc 5743c7a
docs(datafusion): match repo TODO style for issue-2154 follow-up note
huan233usc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to support column references on both sides? e.g. (x + 1) * (x - 2)
I think the example above will not be pushed down with the existing logic since we assume it's a finite literals on one side at least?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes,
(x + 1) * (x - 2)won't be pushed down in this PR.It requires more work to support it safely. To support that we need to:
x + yreduces to two different columns and can't be expressed as a singlecol IS NAN(it would needx IS NAN OR y IS NAN, and picking just one would drop rows).(x + 1) * (x - 2)is NaN iffxis NaN, so it's safe, but(x + 1) - (x - 2)is NaN whenx = inf(inf - inf) even thoughxisn't, so it is not.Maybe we could do it in the follow up, but iiuc Spark won't push down it as well so in practice this might be a little bit less seen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that we don't have to support it in this PR, can we add a note here in the comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done -- added the note with a TODO referencing #2154 for the two-sided column case.