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

Add test case for ANSI pmod and ANSI Remainder #5279

Merged
merged 3 commits into from
Apr 20, 2022

Conversation

res-life
Copy link
Collaborator

Contributes #5119

Signed-off-by: Chong Gao res_life@163.com

Signed-off-by: Chong Gao <res_life@163.com>
@res-life
Copy link
Collaborator Author

res-life commented Apr 19, 2022

Aready supported ANSI pmod and ANSI Remainder, it is just to add test cases.
Spark ANSI behaviors of pmod and Remainder are:

In Spark `DivModLike`

        if (isZero(input2)) {
          // when we reach here, failOnError must bet true.
          throw QueryExecutionErrors.divideByZeroError
        }

Refer to:
https://github.com/apache/spark/blob/v3.2.1/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala#L436

@res-life res-life requested a review from firestarman April 19, 2022 09:27
@res-life res-life marked this pull request as draft April 19, 2022 10:20
@res-life res-life marked this pull request as ready for review April 19, 2022 10:40
@jlowe jlowe added the test Only impacts tests label Apr 19, 2022
@jlowe
Copy link
Member

jlowe commented Apr 19, 2022

build

@sameerz sameerz added this to the Apr 18 - Apr 29 milestone Apr 19, 2022
@res-life res-life merged commit b12f95a into NVIDIA:branch-22.06 Apr 20, 2022
@res-life res-life deleted the ansi-mod-pmod branch April 20, 2022 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Only impacts tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants