-
Notifications
You must be signed in to change notification settings - Fork 242
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
Support legacy behavior of parameterless count #1958
Conversation
Signed-off-by: Raza Jafri <[email protected]>
@abellina can you take a look since you originally worked on aggregates? |
sql-plugin/src/main/scala/com/nvidia/spark/rapids/aggregate.scala
Outdated
Show resolved
Hide resolved
build |
Signed-off-by: Raza Jafri <[email protected]>
build |
@abellina are you OK with this PR? |
Signed-off-by: Raza Jafri <[email protected]>
Signed-off-by: Raza Jafri <[email protected]>
sql-plugin/src/main/scala/com/nvidia/spark/rapids/aggregate.scala
Outdated
Show resolved
Hide resolved
@razajafri just thought of an edge case. Two
|
Signed-off-by: Raza Jafri <[email protected]>
build |
@abellina PTAL |
@razajafri thanks for adding tests. I am still not clear on how this works. My theory is that it works because there is a projection at the end that just sets 0s (i.e. the scalar you are generating is not used). A quick test would be to use something other than 0 for your scalar, to see if that makes a difference. If the above is true, I don't think it changes the impl. It would just be good to fully understand how this is propagating to the result. |
You are right that's how its working. I did a quick test by using a scalar value of 2 and that had no effect on the result |
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.
@razajafri thanks for the changes and for the testing. I think this makes sense and I can't think of a simpler way at this point.
Signed-off-by: Raza Jafri <[email protected]>
build |
* Return a Long col with 0 if agg is empty Signed-off-by: Raza Jafri <[email protected]> * addressed review comments Signed-off-by: Raza Jafri <[email protected]> * improved tests Signed-off-by: Raza Jafri <[email protected]> * added two counts Signed-off-by: Raza Jafri <[email protected]> * added comment Signed-off-by: Raza Jafri <[email protected]> Co-authored-by: Raza Jafri <[email protected]>
* Return a Long col with 0 if agg is empty Signed-off-by: Raza Jafri <[email protected]> * addressed review comments Signed-off-by: Raza Jafri <[email protected]> * improved tests Signed-off-by: Raza Jafri <[email protected]> * added two counts Signed-off-by: Raza Jafri <[email protected]> * added comment Signed-off-by: Raza Jafri <[email protected]> Co-authored-by: Raza Jafri <[email protected]>
This PR returns a Long col with a single row with a value of 0
closes #1737
Signed-off-by: Raza Jafri [email protected]