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 14:17:36 UTC

[GitHub] [arrow-datafusion] andygrove opened a new pull request, #3754: MINOR: Improvements to `scalar_subquery_to_join` error handling

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

   # 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.  
   -->
   
   The rule `scalar_subquery_to_join` converts certain types of qualifying scalar subqueries into joins. When it encounters a subquery that is not possible to convert to a join then it currently fails with an error. It would be better for it to ignore subqueries that are not applicable to this rule.
   
   # 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.
   -->
   
   Stop failing with an error on scalar subqueries that cannot be converted into joins.
   
   # 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 merged pull request #3754: MINOR: Improvements to `scalar_subquery_to_join` error handling

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


-- 
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 #3754: MINOR: Improvements to `scalar_subquery_to_join` error handling

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


##########
datafusion/optimizer/src/scalar_subquery_to_join.rs:
##########
@@ -21,7 +21,7 @@ use crate::utils::{
 };
 use crate::{utils, OptimizerConfig, OptimizerRule};
 use datafusion_common::{context, plan_err, Column, Result};
-use datafusion_expr::logical_plan::{Aggregate, Filter, JoinType, Projection, Subquery};
+use datafusion_expr::logical_plan::{Filter, JoinType, Limit, Subquery};
 use datafusion_expr::{combine_filters, Expr, LogicalPlan, LogicalPlanBuilder, Operator};

Review Comment:
   The idea here is that if the particular subquery isn't supported by the physical operators, it will error out at that time?



-- 
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 #3754: MINOR: Improvements to `scalar_subquery_to_join` error handling

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

   Benchmark runs are scheduled for baseline = 4dd4d43abc12f4419156c877f48348ce55e480c7 and contender = 1d634e500bf7f0179a1a4438a470cad46604a1d5. 1d634e500bf7f0179a1a4438a470cad46604a1d5 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/eb994734517f43c19548745ab986f402...64fed20ba8e844a2b3f3b4b5e3d95098/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/b6cb4bca283147dd86ecdaf486540a6a...b3d46198027f42209e5db37d77693620/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/b84a910cefe64afdad9ede7ffe43e20a...7681bffa43c24c6a9ebc3ac0c49e92f7/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/cd491b86c145493fafb4ca9a1cd3f74f...7751659ef4e34c6898ef286801d4d724/)
   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 a diff in pull request #3754: MINOR: Improvements to `scalar_subquery_to_join` error handling

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


##########
datafusion/optimizer/src/scalar_subquery_to_join.rs:
##########
@@ -21,7 +21,7 @@ use crate::utils::{
 };
 use crate::{utils, OptimizerConfig, OptimizerRule};
 use datafusion_common::{context, plan_err, Column, Result};
-use datafusion_expr::logical_plan::{Aggregate, Filter, JoinType, Projection, Subquery};
+use datafusion_expr::logical_plan::{Filter, JoinType, Limit, Subquery};
 use datafusion_expr::{combine_filters, Expr, LogicalPlan, LogicalPlanBuilder, Operator};

Review Comment:
   > The idea here is that if the particular subquery isn't supported by the physical operators, it will error out at that time?
   
   Yes, exactly. 



-- 
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 #3754: MINOR: Improvements to `scalar_subquery_to_join` error handling

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

   @avantgardnerio Could you review this when you get a chance


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