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/08/25 14:17:38 UTC

[GitHub] [arrow-datafusion] andygrove opened a new pull request, #3260: Use `ExprRewriter` in `pre_cast_lit_in_comparison`

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

   # 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/3259
   
    # 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.  
   -->
   
   This change makes the optimizer support nested expressions, including aliased expressions.
   
   # 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.
   -->
   
   Use `ExprRewriter`.
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   More optimizations!
   
   <!--
   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 #3260: Use `ExprRewriter` in `pre_cast_lit_in_comparison`

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


-- 
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 #3260: Use `ExprRewriter` in `pre_cast_lit_in_comparison`

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

   Benchmark runs are scheduled for baseline = 92110ddba004ca585649d1ba97dcb67f20fc0779 and contender = 5ee52d08ec83e39da6f5e7b3567fa112d3f022d4. 5ee52d08ec83e39da6f5e7b3567fa112d3f022d4 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/3b8ccb4113754353b4fc3e95f98b5a6b...10371de7fcb2477db8272911065dd80a/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/b8976f26c93f4044975c26fa090c5513...b6c6af93b42a4625a4ef4db4986dfd5d/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/d2f69a1d608647fc8748b12ae0b28688...b09972b93cb048d7889606130690a5d0/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/1cd907d12dc0454094d79a99b1bada99...0c62720689144badad9d3355a5ce749d/)
   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] liukun4515 commented on a diff in pull request #3260: Use `ExprRewriter` in `pre_cast_lit_in_comparison`

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


##########
datafusion/optimizer/src/pre_cast_lit_in_comparison.rs:
##########
@@ -318,6 +317,20 @@ mod tests {
         assert_eq!(optimize_test(expr_lt, &schema), expected);
     }
 
+    #[test]
+    fn nested() {

Review Comment:
   Does this test require this pr to pass?
   I think the original logic can handle this case



-- 
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 #3260: Use `ExprRewriter` in `pre_cast_lit_in_comparison`

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

   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/3260?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 [#3260](https://codecov.io/gh/apache/arrow-datafusion/pull/3260?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (01fac56) into [master](https://codecov.io/gh/apache/arrow-datafusion/commit/92110ddba004ca585649d1ba97dcb67f20fc0779?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (92110dd) will **increase** coverage by `0.00%`.
   > The diff coverage is `86.53%`.
   
   > :exclamation: Current head 01fac56 differs from pull request most recent head 6e0f926. Consider uploading reports for the commit 6e0f926 to get more accurate results
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #3260   +/-   ##
   =======================================
     Coverage   85.89%   85.89%           
   =======================================
     Files         294      294           
     Lines       53373    53391   +18     
   =======================================
   + Hits        45845    45861   +16     
   - Misses       7528     7530    +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-datafusion/pull/3260?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...fusion/optimizer/src/pre\_cast\_lit\_in\_comparison.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3260/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-ZGF0YWZ1c2lvbi9vcHRpbWl6ZXIvc3JjL3ByZV9jYXN0X2xpdF9pbl9jb21wYXJpc29uLnJz) | `85.60% <86.53%> (+2.27%)` | :arrow_up: |
   | [datafusion/expr/src/logical\_plan/plan.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3260/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==) | `78.55% <0.00%> (-0.18%)` | :arrow_down: |
   | [datafusion/common/src/scalar.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/3260/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-ZGF0YWZ1c2lvbi9jb21tb24vc3JjL3NjYWxhci5ycw==) | `84.58% <0.00%> (-0.07%)` | :arrow_down: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?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


[GitHub] [arrow-datafusion] andygrove commented on a diff in pull request #3260: Use `ExprRewriter` in `pre_cast_lit_in_comparison`

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


##########
datafusion/optimizer/src/pre_cast_lit_in_comparison.rs:
##########
@@ -318,6 +317,20 @@ mod tests {
         assert_eq!(optimize_test(expr_lt, &schema), expected);
     }
 
+    #[test]
+    fn nested() {

Review Comment:
   No, this is just an additional test to make sure that this PR did not cause any regressions.



-- 
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 pull request #3260: Use `ExprRewriter` in `pre_cast_lit_in_comparison`

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

   Thanks for the review @liukun4515 


-- 
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 #3260: Use `ExprRewriter` in `pre_cast_lit_in_comparison`

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

   nice pr.
   I am ready to do this refactor using the trait `ExprRewriter`, you got ahead.


-- 
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