You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/13 19:25:01 UTC

[GitHub] [arrow-datafusion] andygrove opened a new pull request, #2901: Combine all comparison coercion rules

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

   # 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.
   -->
   
   Closes https://github.com/apache/arrow-datafusion/issues/2890
   
    # 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.  
   -->
   
   It is confusing when we different coercion rules for different comparison operators
   
   # 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.
   -->
   
   Make rules consistent across all comparison operators
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   Yes, when comparing numeric and string expressions with `>`, `<`, `>=`, and `<=` we will now convert the numerics to strings (just like we were already doing for `=` and `!=`) instead of failing
   
   <!--
   If there are any breaking changes to public APIs, please add the `api change` label.
   -->


-- 
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@arrow.apache.org

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


[GitHub] [arrow-datafusion] andygrove merged pull request #2901: Combine all comparison coercion rules

Posted by GitBox <gi...@apache.org>.
andygrove merged PR #2901:
URL: https://github.com/apache/arrow-datafusion/pull/2901


-- 
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@arrow.apache.org

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


[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #2901: Combine all comparison coercion rules

Posted by GitBox <gi...@apache.org>.
andygrove commented on code in PR #2901:
URL: https://github.com/apache/arrow-datafusion/pull/2901#discussion_r921624757


##########
datafusion/core/src/physical_plan/planner.rs:
##########
@@ -1746,8 +1746,6 @@ mod tests {
     async fn errors() -> Result<()> {
         let bool_expr = col("c1").eq(col("c1"));
         let cases = vec![
-            // utf8 < u32
-            col("c1").lt(col("c2")),

Review Comment:
   This test was specifically for illegal type coercions and this is no longer illegal



-- 
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@arrow.apache.org

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


[GitHub] [arrow-datafusion] jdye64 commented on a diff in pull request #2901: Combine all comparison coercion rules

Posted by GitBox <gi...@apache.org>.
jdye64 commented on code in PR #2901:
URL: https://github.com/apache/arrow-datafusion/pull/2901#discussion_r921320366


##########
datafusion/core/src/physical_plan/planner.rs:
##########
@@ -1746,8 +1746,6 @@ mod tests {
     async fn errors() -> Result<()> {
         let bool_expr = col("c1").eq(col("c1"));
         let cases = vec![
-            // utf8 < u32
-            col("c1").lt(col("c2")),

Review Comment:
   Just curious why this was removed from the test?



-- 
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@arrow.apache.org

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


[GitHub] [arrow-datafusion] liukun4515 commented on pull request #2901: Combine all comparison coercion rules

Posted by GitBox <gi...@apache.org>.
liukun4515 commented on PR #2901:
URL: https://github.com/apache/arrow-datafusion/pull/2901#issuecomment-1184013328

   currently, we can follow the rule `convert numeric to utf8` when compare numeric with utf8.
   We can do optimization in the follow-up issue https://github.com/apache/arrow-datafusion/issues/2799


-- 
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@arrow.apache.org

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


[GitHub] [arrow-datafusion] ursabot commented on pull request #2901: Combine all comparison coercion rules

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #2901:
URL: https://github.com/apache/arrow-datafusion/pull/2901#issuecomment-1184956652

   Benchmark runs are scheduled for baseline = 8ad3df54f54acd801d81485d7bb9678bf4727e7c and contender = fb2221c43d3367e876430e687ad6f1783cb79075. fb2221c43d3367e876430e687ad6f1783cb79075 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ec2-t3-xlarge-us-east-2] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/e8a8f11ce60c4ba8b0a3f1573dab87b6...70fe02775a18489c902b54b9c6e858fb/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/154a56d6bed248398e7f864bc453cf59...b6b05b3625a748988cb6c7f01e391cce/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/3e87a1edaf414a0c83fc9a82f176a46c...6f91e158ffe144d6a9c888bf15541f3a/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/8788f5bcdfdc43be9fe2573807cb50f4...93c89d2082784dcb991339217d6a8fc5/)
   Buildkite builds:
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java
   


-- 
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@arrow.apache.org

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


[GitHub] [arrow-datafusion] alamb commented on pull request #2901: Combine all comparison coercion rules

Posted by GitBox <gi...@apache.org>.
alamb commented on PR #2901:
URL: https://github.com/apache/arrow-datafusion/pull/2901#issuecomment-1185444838

   > Like the refactor to a single function and makes things much more clear to me.
   
   I agree -- thank you @andygrove 


-- 
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@arrow.apache.org

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


[GitHub] [arrow-datafusion] codecov-commenter commented on pull request #2901: Combine all comparison coercion rules

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #2901:
URL: https://github.com/apache/arrow-datafusion/pull/2901#issuecomment-1183620472

   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/2901?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#2901](https://codecov.io/gh/apache/arrow-datafusion/pull/2901?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (874285e) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/6a5de4fe08597896ab6375e3e4b76c5744dcfba7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6a5de4f) will **decrease** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2901      +/-   ##
   ==========================================
   - Coverage   85.34%   85.34%   -0.01%     
   ==========================================
     Files         276      276              
     Lines       49294    49284      -10     
   ==========================================
   - Hits        42071    42059      -12     
   - Misses       7223     7225       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-datafusion/pull/2901?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [datafusion/core/src/physical\_plan/planner.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2901/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9jb3JlL3NyYy9waHlzaWNhbF9wbGFuL3BsYW5uZXIucnM=) | `80.96% <ø> (-0.02%)` | :arrow_down: |
   | [datafusion/expr/src/binary\_rule.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2901/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9leHByL3NyYy9iaW5hcnlfcnVsZS5ycw==) | `84.65% <100.00%> (-0.39%)` | :arrow_down: |
   | [datafusion/physical-expr/src/expressions/case.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2901/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9waHlzaWNhbC1leHByL3NyYy9leHByZXNzaW9ucy9jYXNlLnJz) | `92.75% <100.00%> (ø)` | |
   | [datafusion/physical-expr/src/planner.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2901/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9waHlzaWNhbC1leHByL3NyYy9wbGFubmVyLnJz) | `92.36% <100.00%> (ø)` | |
   | [datafusion/expr/src/logical\_plan/plan.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2901/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZGF0YWZ1c2lvbi9leHByL3NyYy9sb2dpY2FsX3BsYW4vcGxhbi5ycw==) | `74.16% <0.00%> (-0.40%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/2901?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/2901?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6a5de4f...874285e](https://codecov.io/gh/apache/arrow-datafusion/pull/2901?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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@arrow.apache.org

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