-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add Support for modulus operation in substrait
#13108
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
Conversation
mod with the standard substrait name modulusmod with the standard substrait name modulus
af82001 to
0d500a9
Compare
mod with the standard substrait name modulusmodulus operation
| "subtract" => Some(Operator::Minus), | ||
| "multiply" => Some(Operator::Multiply), | ||
| "divide" => Some(Operator::Divide), | ||
| "mod" => Some(Operator::Modulo), |
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.
because mod is the same as modulus we need to mark it as deprecated somehow, but how?
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'm not sure how to produce a deprecation warning for this programatically.
However, we can provide an easy migration path if we also update the producer code to use modulus so we can release a version of DataFusion that consumes mod and modulus, and produces only modulus. Then the version after than we remove mod and announce it as a breaking change in the release notes.
modulus operation modulus operation
alamb
left a 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.
Thank you @LatrecheYasser
cc @Blizzara @westonpace and @vbarua
modulus operation modulus operation in substrait
alamb
left a 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.
This change seems good to me -- thank you @LatrecheYasser and @vbarua
My only concern is that it isn't tested (and no tests needed to be updated either).
But maybe that is ok, as this PR doesn't improve / make the testing situation worse
|
LGTM. Tests don’t need updating as we mainly test the roundtrips (I didn’t check if we test even that for this specific function, but even if we did, it still would just keep passing.) I dunno if it makes sense to manually test all functions, but I think nowdays the substrait-rs might include the Substrait default function definition yamls so we could maybe do something to compare the produced functions against them (which would have caught the ”mod” before).. |
|
Thank you @LatrecheYasser and @Blizzara I am sorry for the delay in merging this |
Which issue does this PR close?
This PR replaces adds the operation name
moduluswhich is the standard Substrait operation name formodRationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?