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

[GitHub] [arrow-datafusion] andygrove opened a new pull request, #2899: WIP: Improve formatting of logical plans containing subqueries

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

   # 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/2898
   
    # 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.  
   -->
   
   ## Before:
   
   ```
   Projection: #employee_csv.id
     Filter: #employee_csv.state IN (Subquery: TableScan: employee_csv projection=[state])
       TableScan: employee_csv projection=[id, state]
   ```
   
   ## After
   
   ```
   Projection: #employee_csv.id
     Filter: #employee_csv.state IN (<subquery>)
       Subquery:
         TableScan: employee_csv projection=[state]
       TableScan: employee_csv projection=[id, state]
   ```
   
   # 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.
   -->
   
   - IndentVisitor visits all inputs, including subqueries
   - Subquery expressions no longer display their subqueries
   
   # 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, plans look different
   
   <!--
   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 commented on pull request #2899: Improve formatting of logical plans containing subqueries

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

   @avantgardnerio This might help simplify some of your tests


-- 
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 #2899: Improve formatting of logical plans containing subqueries

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

   Benchmark runs are scheduled for baseline = 6a5de4fe08597896ab6375e3e4b76c5744dcfba7 and contender = fd64e6f2e5ca5ba8c33c431b75a3ba9441091970. fd64e6f2e5ca5ba8c33c431b75a3ba9441091970 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/f4ffff512f144a27a2788d9bbfbfde48...49a1d1abe7a04661a48bcd36c95c6e49/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on test-mac-arm] [test-mac-arm](https://conbench.ursa.dev/compare/runs/f924ad77c7fd473eb7d7b0550f3855cc...e3463576e89146839bd68e18095a44d7/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-i9-9960x] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/513627bc9b614a74a93cdd9d87303bc2...4955ee341d9742af8d0a642577840bbb/)
   [Skipped :warning: Benchmarking of arrow-datafusion-commits is not supported on ursa-thinkcentre-m75q] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/0ed5fbb59e1043adb81336449948338b...18cb97ee277742dd9590f5a48d15539c/)
   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 #2899: Improve formatting of logical plans containing subqueries

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


##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -396,8 +396,10 @@ impl LogicalPlan {
         }
 
         let recurse = match self {
-            LogicalPlan::Projection(Projection { input, .. }) => input.accept(visitor)?,
-            LogicalPlan::Filter(Filter { input, .. }) => input.accept(visitor)?,
+            LogicalPlan::Projection(Projection { .. }) => {
+                self.visit_all_inputs(visitor)?
+            }
+            LogicalPlan::Filter(Filter { .. }) => self.visit_all_inputs(visitor)?,

Review Comment:
   This is the main change. We now visit all inputs, including subqueries. I have only implemented this for `Projection` and `Filter` in this PR.



-- 
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 #2899: Improve formatting of logical plans containing subqueries

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

   # [Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/2899?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 [#2899](https://codecov.io/gh/apache/arrow-datafusion/pull/2899?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7592829) 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 `82.25%`.
   
   > :exclamation: Current head 7592829 differs from pull request most recent head 37ab28a. Consider uploading reports for the commit 37ab28a to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master    #2899      +/-   ##
   ==========================================
   - Coverage   85.34%   85.34%   -0.01%     
   ==========================================
     Files         276      276              
     Lines       49294    49322      +28     
   ==========================================
   + Hits        42071    42092      +21     
   - Misses       7223     7230       +7     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow-datafusion/pull/2899?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/expr/src/expr.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2899/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-ZGF0YWZ1c2lvbi9leHByL3NyYy9leHByLnJz) | `83.60% <0.00%> (-2.50%)` | :arrow_down: |
   | [datafusion/optimizer/src/filter\_push\_down.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2899/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-ZGF0YWZ1c2lvbi9vcHRpbWl6ZXIvc3JjL2ZpbHRlcl9wdXNoX2Rvd24ucnM=) | `98.23% <ø> (ø)` | |
   | [datafusion/optimizer/src/limit\_push\_down.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2899/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-ZGF0YWZ1c2lvbi9vcHRpbWl6ZXIvc3JjL2xpbWl0X3B1c2hfZG93bi5ycw==) | `99.67% <ø> (ø)` | |
   | [...atafusion/optimizer/src/subquery\_filter\_to\_join.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2899/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-ZGF0YWZ1c2lvbi9vcHRpbWl6ZXIvc3JjL3N1YnF1ZXJ5X2ZpbHRlcl90b19qb2luLnJz) | `93.90% <ø> (ø)` | |
   | [datafusion/expr/src/logical\_plan/plan.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2899/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==) | `76.20% <95.23%> (+1.64%)` | :arrow_up: |
   | [datafusion/expr/src/logical\_plan/builder.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2899/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-ZGF0YWZ1c2lvbi9leHByL3NyYy9sb2dpY2FsX3BsYW4vYnVpbGRlci5ycw==) | `89.86% <100.00%> (ø)` | |
   | [datafusion/sql/src/planner.rs](https://codecov.io/gh/apache/arrow-datafusion/pull/2899/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-ZGF0YWZ1c2lvbi9zcWwvc3JjL3BsYW5uZXIucnM=) | `81.31% <100.00%> (-0.07%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow-datafusion/pull/2899?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/2899?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...37ab28a](https://codecov.io/gh/apache/arrow-datafusion/pull/2899?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


[GitHub] [arrow-datafusion] andygrove merged pull request #2899: Improve formatting of logical plans containing subqueries

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


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