You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "andygrove (via GitHub)" <gi...@apache.org> on 2024/06/05 15:51:28 UTC

[PR] feat: Add fuzz testing for arithmetic expressions [datafusion-comet]

andygrove opened a new pull request, #519:
URL: https://github.com/apache/datafusion-comet/pull/519

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   N/A
   
   ## Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   Increasing coverage of fuzz testing tool.
   
   
   ## What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   Add fuzz testing for arithmetic expressions.
   
   ## How are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   Manually. 
   
   Example of compatibility issue found by these new tests:
   
   ## SQL
   ```
   SELECT c90, c1, c90 % c1 FROM test1 ORDER BY c90, c1;
   ```
   
   First difference at row 31:
   Spark: `-21840,-0.0,NULL`
   Comet: `-21840,-0.0,NaN`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add fuzz testing for arithmetic expressions [datafusion-comet]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #519:
URL: https://github.com/apache/datafusion-comet/pull/519#issuecomment-2150566691

   ## [Codecov](https://app.codecov.io/gh/apache/datafusion-comet/pull/519?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 34.07%. Comparing base [(`7ba5693`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/7ba569357cadade64b49b6bdf5f0946f81f95301?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`449cb92`)](https://app.codecov.io/gh/apache/datafusion-comet/commit/449cb922837af8ccf70c901431bcde294cd8523b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   > Report is 18 commits behind head on main.
   
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             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     
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/datafusion-comet/pull/519?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add fuzz testing for arithmetic expressions [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove merged PR #519:
URL: https://github.com/apache/datafusion-comet/pull/519


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add fuzz testing for arithmetic expressions [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on PR #519:
URL: https://github.com/apache/datafusion-comet/pull/519#issuecomment-2151137653

   Thanks for the review @huaxingao @kazuyukitanimura @viirya I have added the bitwise expressions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add fuzz testing for arithmetic expressions [datafusion-comet]

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove commented on code in PR #519:
URL: https://github.com/apache/datafusion-comet/pull/519#discussion_r1630655033


##########
fuzz-testing/src/main/scala/org/apache/comet/fuzz/Meta.scala:
##########
@@ -106,4 +106,8 @@ object Meta {
     Function("stddev_samp", 1),
     Function("corr", 2))
 
+  val unaryArithmeticOps: Seq[String] = Seq("+", "-")
+
+  val binaryArithmeticOps: Seq[String] = Seq("+", "-", "*", "/", "%", "&", "|", "^")

Review Comment:
   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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add fuzz testing for arithmetic expressions [datafusion-comet]

Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on code in PR #519:
URL: https://github.com/apache/datafusion-comet/pull/519#discussion_r1630219102


##########
fuzz-testing/src/main/scala/org/apache/comet/fuzz/Meta.scala:
##########
@@ -106,4 +106,8 @@ object Meta {
     Function("stddev_samp", 1),
     Function("corr", 2))
 
+  val unaryArithmeticOps: Seq[String] = Seq("+", "-")
+
+  val binaryArithmeticOps: Seq[String] = Seq("+", "-", "*", "/", "%", "&", "|", "^")

Review Comment:
   any plans to support`<, <=, ==, <=>, >, >=, =, !` ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: Add fuzz testing for arithmetic expressions [datafusion-comet]

Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on PR #519:
URL: https://github.com/apache/datafusion-comet/pull/519#issuecomment-2150588332

   Thanks @andygrove for the PR! For binary arithmetic expressions, shall we also include bitwise operation such as `BitwiseAnd`, `BitwiseOr`, `BitwiseXor`?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org