Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render plan structure #888

Merged
merged 1 commit into from Jun 2, 2019

Conversation

3 participants
@martint
Copy link
Member

commented Jun 2, 2019

Make the tree structure of the plan clearer. Sample output:

                                               Query Plan
---------------------------------------------------------------------------------------------------------
 Output[_col0]
 │   Layout: [count:bigint]
 │   Estimates: {rows: ? (?), cpu: ?, memory: ?, network: ?}
 │   _col0 := count
 └─ Aggregate(FINAL)
    │   Layout: [count:bigint]
    │   Estimates: {rows: ? (?), cpu: ?, memory: ?, network: ?}
    │   count := "count"("count_9")
    └─ LocalExchange[SINGLE] ()
       │   Layout: [count_9:bigint]
       │   Estimates: {rows: ? (?), cpu: ?, memory: ?, network: ?}
       └─ RemoteExchange[GATHER]
          │   Layout: [count_9:bigint]
          │   Estimates: {rows: ? (?), cpu: ?, memory: ?, network: ?}
          └─ Aggregate(PARTIAL)
             │   Layout: [count_9:bigint]
             │   count_9 := "count"(*)
             └─ InnerJoin[("orderkey" = "orderkey_0")]
                │   Layout: []
                │   Estimates: {rows: 60175 (0B), cpu: 2.32M, memory: 528.88kB, network: 528.88kB}
                │   Distribution: PARTITIONED
                ├─ TableScan[tpch:orders:sf0.01]
                │      Layout: [orderkey:bigint]
                │      Estimates: {rows: 15000 (131.84kB), cpu: 131.84k, memory: 0B, network: 0B}
                │      orderkey := tpch:orderkey
                │      tpch:orderstatus
                │          :: [[F], [O], [P]]
                └─ LocalExchange[HASH] ("orderkey_0")
                   │   Layout: [orderkey_0:bigint]
                   │   Estimates: {rows: 60175 (528.88kB), cpu: 1.55M, memory: 0B, network: 528.88kB}
                   └─ RemoteExchange[REPARTITION]
                      │   Layout: [orderkey_0:bigint]
                      │   Estimates: {rows: 60175 (528.88kB), cpu: 1.03M, memory: 0B, network: 528.88kB}
                      └─ TableScan[tpch:lineitem:sf0.01]
                             Layout: [orderkey_0:bigint]
                             Estimates: {rows: 60175 (528.88kB), cpu: 528.88k, memory: 0B, network: 0B}
                             orderkey_0 := tpch:orderkey

@cla-bot cla-bot bot added the cla-signed label Jun 2, 2019

Render plan structure
Make the tree structure of the plan clearer. Sample output:

                                               Query Plan
---------------------------------------------------------------------------------------------------------
 Output[_col0]
 │   Layout: [count:bigint]
 │   Estimates: {rows: ? (?), cpu: ?, memory: ?, network: ?}
 │   _col0 := count
 └─ Aggregate(FINAL)
    │   Layout: [count:bigint]
    │   Estimates: {rows: ? (?), cpu: ?, memory: ?, network: ?}
    │   count := "count"("count_9")
    └─ LocalExchange[SINGLE] ()
       │   Layout: [count_9:bigint]
       │   Estimates: {rows: ? (?), cpu: ?, memory: ?, network: ?}
       └─ RemoteExchange[GATHER]
          │   Layout: [count_9:bigint]
          │   Estimates: {rows: ? (?), cpu: ?, memory: ?, network: ?}
          └─ Aggregate(PARTIAL)
             │   Layout: [count_9:bigint]
             │   count_9 := "count"(*)
             └─ InnerJoin[("orderkey" = "orderkey_0")]
                │   Layout: []
                │   Estimates: {rows: 60175 (0B), cpu: 2.32M, memory: 528.88kB, network: 528.88kB}
                │   Distribution: PARTITIONED
                ├─ TableScan[tpch:orders:sf0.01]
                │      Layout: [orderkey:bigint]
                │      Estimates: {rows: 15000 (131.84kB), cpu: 131.84k, memory: 0B, network: 0B}
                │      orderkey := tpch:orderkey
                │      tpch:orderstatus
                │          :: [[F], [O], [P]]
                └─ LocalExchange[HASH] ("orderkey_0")
                   │   Layout: [orderkey_0:bigint]
                   │   Estimates: {rows: 60175 (528.88kB), cpu: 1.55M, memory: 0B, network: 528.88kB}
                   └─ RemoteExchange[REPARTITION]
                      │   Layout: [orderkey_0:bigint]
                      │   Estimates: {rows: 60175 (528.88kB), cpu: 1.03M, memory: 0B, network: 528.88kB}
                      └─ TableScan[tpch:lineitem:sf0.01]
                             Layout: [orderkey_0:bigint]
                             Estimates: {rows: 60175 (528.88kB), cpu: 528.88k, memory: 0B, network: 0B}
                             orderkey_0 := tpch:orderkey

@martint martint force-pushed the martint:plan-structure branch from 23806bd to 1e5ca43 Jun 2, 2019

@dain

dain approved these changes Jun 2, 2019

@martint martint merged commit 5b411df into prestosql:master Jun 2, 2019

2 checks passed

Travis CI - Pull Request Build Passed
Details
verification/cla-signed
Details
@findepi

This comment has been minimized.

Copy link
Member

commented Jun 2, 2019

@martint

This comment has been minimized.

Copy link
Member Author

commented Jun 2, 2019

Inspired by that, but I had to reimplement it since his version was from before PlanPrinter was refactored.

@martint martint referenced this pull request Jun 4, 2019

Closed

Release notes for 314 #879

2 of 6 tasks complete

@findepi findepi added this to the 314 milestone Jun 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.