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/10/07 22:25:27 UTC

[GitHub] [arrow-datafusion] andygrove opened a new pull request, #3764: WIP: Fix optimizer regression with simplifying expressions in subquery filters

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

   # 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/3760
   
    # 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.  
   -->
   
   # 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.
   -->
   
   # Are there any user-facing changes?
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   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] alamb commented on a diff in pull request #3764: Fix optimizer regression with simplifying expressions in subquery filters

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


##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -144,6 +144,10 @@ impl Optimizer {
             Arc::new(DecorrelateWhereIn::new()),
             Arc::new(ScalarSubqueryToJoin::new()),
             Arc::new(SubqueryFilterToJoin::new()),
+            // simplify expressions does not simplify expressions in subqueries, so we

Review Comment:
   I agree #3770 is a better long term solution



-- 
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 #3764: Fix optimizer regression with simplifying expressions in subquery filters

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

   Benchmark runs are scheduled for baseline = e395e30cd972ba9684020a4167c12d1424675698 and contender = 80228279d61c10903cd9707fafcbccb8b15d5e1c. 80228279d61c10903cd9707fafcbccb8b15d5e1c 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/f898631a686c44d3ad68e8c649de01ba...e7bf52cd34a4448eafbd446db724c4d6/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/443483318e0042f0aabb0438fb6170c9...713b77ea3697451bb887818a26a72fb5/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/ac7a17640a9a424493d6fee570f05f99...ea9d226fb0a2474f978a253bdcefd38c/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/f72dbe5206714be68efc935add6c56f9...31b326e3adf04718a9ae405e3786dcaf/)
   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] andygrove commented on pull request #3764: Fix optimizer regression with simplifying expressions in subquery filters

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

   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] andygrove commented on a diff in pull request #3764: Fix optimizer regression with simplifying expressions in subquery filters

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


##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -144,6 +144,10 @@ impl Optimizer {
             Arc::new(DecorrelateWhereIn::new()),
             Arc::new(ScalarSubqueryToJoin::new()),
             Arc::new(SubqueryFilterToJoin::new()),
+            // simplify expressions does not simplify expressions in subqueries, so we

Review Comment:
   This PR just reverts the regression and adds a regression test, but I agree, would be better to handle it in `simplify_expressions`. I filed https://github.com/apache/arrow-datafusion/issues/3770 for this.
   
   



-- 
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 #3764: Fix optimizer regression with simplifying expressions in subquery filters

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

   LGTM thanks 
   


-- 
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 #3764: Fix optimizer regression with simplifying expressions in subquery filters

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


-- 
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 #3764: Fix optimizer regression with simplifying expressions in subquery filters

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


##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -144,6 +144,10 @@ impl Optimizer {
             Arc::new(DecorrelateWhereIn::new()),
             Arc::new(ScalarSubqueryToJoin::new()),
             Arc::new(SubqueryFilterToJoin::new()),
+            // simplify expressions does not simplify expressions in subqueries, so we

Review Comment:
   I think it's a solution to resolve this.
   But We also has a way to resolve this issue by supporting the `subquery` in the rewriter of `simplify expression`.
   Why not support the `subquery` in the rewriter of simplify expression?



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