-
Notifications
You must be signed in to change notification settings - Fork 169
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 fuzz testing for arithmetic expressions #519
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #519 +/- ##
============================================
+ Coverage 34.05% 34.07% +0.01%
+ Complexity 859 795 -64
============================================
Files 116 104 -12
Lines 38679 38470 -209
Branches 8567 8564 -3
============================================
- Hits 13173 13107 -66
+ Misses 22745 22606 -139
+ Partials 2761 2757 -4 ☔ View full report in Codecov by Sentry. |
Thanks @andygrove for the PR! For binary arithmetic expressions, shall we also include bitwise operation such as |
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.
Looks good. We could add BitwiseAnd
etc like @huaxingao mentioned.
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.
+1 for adding more operations
Thanks for the review @huaxingao @kazuyukitanimura @viirya I have added the bitwise expressions. |
@@ -106,4 +106,8 @@ object Meta { | |||
Function("stddev_samp", 1), | |||
Function("corr", 2)) | |||
|
|||
val unaryArithmeticOps: Seq[String] = Seq("+", "-") | |||
|
|||
val binaryArithmeticOps: Seq[String] = Seq("+", "-", "*", "/", "%", "&", "|", "^") |
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.
any plans to support<, <=, ==, <=>, >, >=, =, !
?
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.
Thsi PR was focussing on arithmetic because it is related to the ongoing work to support ANSI mode, but yet, we should add tests for comparison operators as well
* Add fuzz tests for aritmetic expressions * add unary math * add bit-wise expressions * bug fix
Which issue does this PR close?
N/A
Rationale for this change
Increasing coverage of fuzz testing tool.
What changes are included in this PR?
Add fuzz testing for arithmetic expressions.
How are these changes tested?
Manually.
Example of compatibility issue found by these new tests:
SQL
First difference at row 31:
Spark:
-21840,-0.0,NULL
Comet:
-21840,-0.0,NaN