blob: fe3fd4154cfc54e46522d1e01854cbc1b62a6658 [file] [log] [blame]
# Parquet scan
select * from tpch_parquet.lineitem
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=80.00MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=80.00MB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
00:SCAN HDFS [tpch_parquet.lineitem]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=80.00MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=263B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=80.00MB mem-reservation=0B
00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=160.00MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=263B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=160.00MB mem-reservation=0B
00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
====
# Text scan
select * from tpch.lineitem;
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=88.00MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
00:SCAN HDFS [tpch.lineitem]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=88.00MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=263B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
00:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=176.00MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=263B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=176.00MB mem-reservation=0B
00:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
====
# HBase scan
select * from functional_hbase.alltypes
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=1.00GB
WARNING: The following tables are missing relevant table and/or column statistics.
functional_hbase.alltypes
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=1.00GB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
00:SCAN HBASE [functional_hbase.alltypes]
table stats: rows=unavailable
column stats: unavailable
mem-estimate=1.00GB mem-reservation=0B
tuple-ids=0 row-size=88B cardinality=14298
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=1.00GB
WARNING: The following tables are missing relevant table and/or column statistics.
functional_hbase.alltypes
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=88B cardinality=14298
|
F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
Per-Host Resources: mem-estimate=1.00GB mem-reservation=0B
00:SCAN HBASE [functional_hbase.alltypes]
table stats: rows=unavailable
column stats: unavailable
mem-estimate=1.00GB mem-reservation=0B
tuple-ids=0 row-size=88B cardinality=14298
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=2.00GB
WARNING: The following tables are missing relevant table and/or column statistics.
functional_hbase.alltypes
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=88B cardinality=14298
|
F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
Per-Host Resources: mem-estimate=2.00GB mem-reservation=0B
00:SCAN HBASE [functional_hbase.alltypes]
table stats: rows=unavailable
column stats: unavailable
mem-estimate=1.00GB mem-reservation=0B
tuple-ids=0 row-size=88B cardinality=14298
====
# Data source scan
select * from functional.alltypes_datasource
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=1.00GB
WARNING: The following tables are missing relevant table and/or column statistics.
functional.alltypes_datasource
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=1.00GB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
00:SCAN DATA SOURCE [functional.alltypes_datasource]
mem-estimate=1.00GB mem-reservation=0B
tuple-ids=0 row-size=116B cardinality=5000
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=1.00GB
WARNING: The following tables are missing relevant table and/or column statistics.
functional.alltypes_datasource
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=116B cardinality=5000
|
F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
Per-Host Resources: mem-estimate=1.00GB mem-reservation=0B
00:SCAN DATA SOURCE [functional.alltypes_datasource]
mem-estimate=1.00GB mem-reservation=0B
tuple-ids=0 row-size=116B cardinality=5000
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=2.00GB
WARNING: The following tables are missing relevant table and/or column statistics.
functional.alltypes_datasource
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=116B cardinality=5000
|
F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
Per-Host Resources: mem-estimate=2.00GB mem-reservation=0B
00:SCAN DATA SOURCE [functional.alltypes_datasource]
mem-estimate=1.00GB mem-reservation=0B
tuple-ids=0 row-size=116B cardinality=5000
====
# Union
select * from tpch.lineitem
union all
select * from tpch.lineitem
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=88.00MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
00:UNION
| pass-through-operands: all
| mem-estimate=0B mem-reservation=0B
| tuple-ids=2 row-size=263B cardinality=12002430
|
|--02:SCAN HDFS [tpch.lineitem]
| partitions=1/1 files=1 size=718.94MB
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=718.94MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=263B cardinality=6001215
|
01:SCAN HDFS [tpch.lineitem]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=88.00MB
F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
03:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=2 row-size=263B cardinality=12002430
|
F02:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
00:UNION
| pass-through-operands: all
| mem-estimate=0B mem-reservation=0B
| tuple-ids=2 row-size=263B cardinality=12002430
|
|--02:SCAN HDFS [tpch.lineitem, RANDOM]
| partitions=1/1 files=1 size=718.94MB
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=718.94MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=263B cardinality=6001215
|
01:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=176.00MB
F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
03:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=2 row-size=263B cardinality=12002430
|
F02:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=176.00MB mem-reservation=0B
00:UNION
| pass-through-operands: all
| mem-estimate=0B mem-reservation=0B
| tuple-ids=2 row-size=263B cardinality=12002430
|
|--02:SCAN HDFS [tpch.lineitem, RANDOM]
| partitions=1/1 files=1 size=718.94MB
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=718.94MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=263B cardinality=6001215
|
01:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
====
# Grouping aggregation
select l_orderkey, count(*)
from tpch_parquet.lineitem
group by l_orderkey
---- PLAN
Max Per-Host Resource Reservation: Memory=34.00MB
Per-Host Resource Estimates: Memory=114.00MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=114.00MB mem-reservation=34.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:AGGREGATE [FINALIZE]
| output: count(*)
| group by: l_orderkey
| mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=1 row-size=16B cardinality=1563438
|
00:SCAN HDFS [tpch_parquet.lineitem]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=8B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=42.50MB
Per-Host Resource Estimates: Memory=124.00MB
F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
04:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=16B cardinality=1563438
|
F01:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=3
Per-Host Resources: mem-estimate=10.00MB mem-reservation=8.50MB
03:AGGREGATE [FINALIZE]
| output: count:merge(*)
| group by: l_orderkey
| mem-estimate=10.00MB mem-reservation=8.50MB spill-buffer=512.00KB
| tuple-ids=1 row-size=16B cardinality=1563438
|
02:EXCHANGE [HASH(l_orderkey)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=16B cardinality=1563438
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=114.00MB mem-reservation=34.00MB
01:AGGREGATE [STREAMING]
| output: count(*)
| group by: l_orderkey
| mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=1 row-size=16B cardinality=1563438
|
00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=8B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=77.50MB
Per-Host Resource Estimates: Memory=248.00MB
F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
04:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=16B cardinality=1563438
|
F01:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=6
Per-Host Resources: mem-estimate=20.00MB mem-reservation=9.50MB
03:AGGREGATE [FINALIZE]
| output: count:merge(*)
| group by: l_orderkey
| mem-estimate=10.00MB mem-reservation=4.75MB spill-buffer=256.00KB
| tuple-ids=1 row-size=16B cardinality=1563438
|
02:EXCHANGE [HASH(l_orderkey)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=16B cardinality=1563438
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=228.00MB mem-reservation=68.00MB
01:AGGREGATE [STREAMING]
| output: count(*)
| group by: l_orderkey
| mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=1 row-size=16B cardinality=1563438
|
00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=8B cardinality=6001215
====
# Non-grouping aggregation with zero-slot parquet scan
select count(*) from tpch_parquet.lineitem
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=11.00MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=11.00MB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:AGGREGATE [FINALIZE]
| output: sum_init_zero(tpch_parquet.lineitem.parquet-stats: num_rows)
| mem-estimate=10.00MB mem-reservation=0B spill-buffer=2.00MB
| tuple-ids=1 row-size=8B cardinality=1
|
00:SCAN HDFS [tpch_parquet.lineitem]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=1.00MB mem-reservation=0B
tuple-ids=0 row-size=8B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=21.00MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=10.00MB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
03:AGGREGATE [FINALIZE]
| output: count:merge(*)
| mem-estimate=10.00MB mem-reservation=0B spill-buffer=2.00MB
| tuple-ids=1 row-size=8B cardinality=1
|
02:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=8B cardinality=1
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=11.00MB mem-reservation=0B
01:AGGREGATE
| output: sum_init_zero(tpch_parquet.lineitem.parquet-stats: num_rows)
| mem-estimate=10.00MB mem-reservation=0B spill-buffer=2.00MB
| tuple-ids=1 row-size=8B cardinality=1
|
00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=1.00MB mem-reservation=0B
tuple-ids=0 row-size=8B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=190.00MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=10.00MB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
03:AGGREGATE [FINALIZE]
| output: count:merge(*)
| mem-estimate=10.00MB mem-reservation=0B spill-buffer=2.00MB
| tuple-ids=1 row-size=8B cardinality=1
|
02:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=8B cardinality=1
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=180.00MB mem-reservation=0B
01:AGGREGATE
| output: sum_init_zero(tpch_parquet.lineitem.parquet-stats: num_rows)
| mem-estimate=10.00MB mem-reservation=0B spill-buffer=2.00MB
| tuple-ids=1 row-size=8B cardinality=1
|
00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=8B cardinality=6001215
====
# Sort
select *
from tpch_parquet.lineitem
order by l_comment
---- PLAN
Max Per-Host Resource Reservation: Memory=12.00MB
Per-Host Resource Estimates: Memory=120.00MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=120.00MB mem-reservation=12.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:SORT
| order by: l_comment ASC
| mem-estimate=40.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=1 row-size=263B cardinality=6001215
|
00:SCAN HDFS [tpch_parquet.lineitem]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=12.00MB
Per-Host Resource Estimates: Memory=120.00MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
02:MERGING-EXCHANGE [UNPARTITIONED]
| order by: l_comment ASC
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=263B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=120.00MB mem-reservation=12.00MB
01:SORT
| order by: l_comment ASC
| mem-estimate=40.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=1 row-size=263B cardinality=6001215
|
00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=24.00MB
Per-Host Resource Estimates: Memory=240.00MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
02:MERGING-EXCHANGE [UNPARTITIONED]
| order by: l_comment ASC
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=263B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=240.00MB mem-reservation=24.00MB
01:SORT
| order by: l_comment ASC
| mem-estimate=40.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=1 row-size=263B cardinality=6001215
|
00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
====
# TOP-N
select *
from tpch_parquet.lineitem
order by l_comment
limit 100
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=80.03MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=80.03MB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:TOP-N [LIMIT=100]
| order by: l_comment ASC
| mem-estimate=25.66KB mem-reservation=0B
| tuple-ids=1 row-size=263B cardinality=100
|
00:SCAN HDFS [tpch_parquet.lineitem]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=80.03MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
02:MERGING-EXCHANGE [UNPARTITIONED]
| order by: l_comment ASC
| limit: 100
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=263B cardinality=100
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=80.03MB mem-reservation=0B
01:TOP-N [LIMIT=100]
| order by: l_comment ASC
| mem-estimate=25.66KB mem-reservation=0B
| tuple-ids=1 row-size=263B cardinality=100
|
00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=160.05MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
02:MERGING-EXCHANGE [UNPARTITIONED]
| order by: l_comment ASC
| limit: 100
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=263B cardinality=100
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=160.05MB mem-reservation=0B
01:TOP-N [LIMIT=100]
| order by: l_comment ASC
| mem-estimate=25.66KB mem-reservation=0B
| tuple-ids=1 row-size=263B cardinality=100
|
00:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
====
# Broadcast Hash Join
select *
from tpch.lineitem inner join tpch.orders on l_orderkey = o_orderkey
---- PLAN
Max Per-Host Resource Reservation: Memory=34.00MB
Per-Host Resource Estimates: Memory=476.41MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=476.41MB mem-reservation=34.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
02:HASH JOIN [INNER JOIN]
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF000 <- o_orderkey
| mem-estimate=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=0,1 row-size=454B cardinality=5757710
|
|--01:SCAN HDFS [tpch.orders]
| partitions=1/1 files=1 size=162.56MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=191B cardinality=1500000
|
00:SCAN HDFS [tpch.lineitem]
partitions=1/1 files=1 size=718.94MB
runtime filters: RF000 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=34.00MB
Per-Host Resource Estimates: Memory=476.41MB
F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
04:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0,1 row-size=454B cardinality=5757710
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=388.41MB mem-reservation=34.00MB
02:HASH JOIN [INNER JOIN, BROADCAST]
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF000 <- o_orderkey
| mem-estimate=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=0,1 row-size=454B cardinality=5757710
|
|--03:EXCHANGE [BROADCAST]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=191B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
| Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
| 01:SCAN HDFS [tpch.orders, RANDOM]
| partitions=1/1 files=1 size=162.56MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=191B cardinality=1500000
|
00:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
runtime filters: RF000 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=68.00MB
Per-Host Resource Estimates: Memory=952.83MB
F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
04:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0,1 row-size=454B cardinality=5757710
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=776.83MB mem-reservation=68.00MB
02:HASH JOIN [INNER JOIN, BROADCAST]
| hash-table-id=00
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF000 <- o_orderkey
| mem-estimate=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=0,1 row-size=454B cardinality=5757710
|
|--F03:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| | Per-Host Resources: included in parent fragment
| JOIN BUILD
| | join-table-id=00 plan-id=01 cohort-id=01
| | build expressions: o_orderkey
| | mem-estimate=0B mem-reservation=0B
| |
| 03:EXCHANGE [BROADCAST]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=191B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| Per-Host Resources: mem-estimate=176.00MB mem-reservation=0B
| 01:SCAN HDFS [tpch.orders, RANDOM]
| partitions=1/1 files=1 size=162.56MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=191B cardinality=1500000
|
00:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
runtime filters: RF000 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
====
# Shuffle Hash Join
select *
from tpch.lineitem inner join /* +shuffle */ tpch.orders on l_orderkey = o_orderkey
---- PLAN
Max Per-Host Resource Reservation: Memory=34.00MB
Per-Host Resource Estimates: Memory=476.41MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=476.41MB mem-reservation=34.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
02:HASH JOIN [INNER JOIN]
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF000 <- o_orderkey
| mem-estimate=300.41MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=0,1 row-size=454B cardinality=5757710
|
|--01:SCAN HDFS [tpch.orders]
| partitions=1/1 files=1 size=162.56MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=191B cardinality=1500000
|
00:SCAN HDFS [tpch.lineitem]
partitions=1/1 files=1 size=718.94MB
runtime filters: RF000 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=34.00MB
Per-Host Resource Estimates: Memory=276.14MB
F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
05:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0,1 row-size=454B cardinality=5757710
|
F02:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=3
Per-Host Resources: mem-estimate=100.14MB mem-reservation=34.00MB
02:HASH JOIN [INNER JOIN, PARTITIONED]
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF000 <- o_orderkey
| mem-estimate=100.14MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=0,1 row-size=454B cardinality=5757710
|
|--04:EXCHANGE [HASH(o_orderkey)]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=191B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
| Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
| 01:SCAN HDFS [tpch.orders, RANDOM]
| partitions=1/1 files=1 size=162.56MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=191B cardinality=1500000
|
03:EXCHANGE [HASH(l_orderkey)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=263B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
00:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
runtime filters: RF000 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=68.00MB
Per-Host Resource Estimates: Memory=452.14MB
F03:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
05:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0,1 row-size=454B cardinality=5757710
|
F02:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=6
Per-Host Resources: mem-estimate=100.14MB mem-reservation=68.00MB
02:HASH JOIN [INNER JOIN, PARTITIONED]
| hash-table-id=00
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF000 <- o_orderkey
| mem-estimate=50.07MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=0,1 row-size=454B cardinality=5757710
|
|--F04:PLAN FRAGMENT [HASH(l_orderkey)] hosts=2 instances=4
| | Per-Host Resources: included in parent fragment
| JOIN BUILD
| | join-table-id=00 plan-id=01 cohort-id=01
| | build expressions: o_orderkey
| | mem-estimate=0B mem-reservation=0B
| |
| 04:EXCHANGE [HASH(o_orderkey)]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=191B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| Per-Host Resources: mem-estimate=176.00MB mem-reservation=0B
| 01:SCAN HDFS [tpch.orders, RANDOM]
| partitions=1/1 files=1 size=162.56MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=191B cardinality=1500000
|
03:EXCHANGE [HASH(l_orderkey)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=263B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=176.00MB mem-reservation=0B
00:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
runtime filters: RF000 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
====
# Nested loop join
select *
from tpch.lineitem, tpch.orders
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=449.10MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=449.10MB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
02:NESTED LOOP JOIN [CROSS JOIN]
| mem-estimate=273.10MB mem-reservation=0B
| tuple-ids=0,1 row-size=454B cardinality=9001822500000
|
|--01:SCAN HDFS [tpch.orders]
| partitions=1/1 files=1 size=162.56MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=191B cardinality=1500000
|
00:SCAN HDFS [tpch.lineitem]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=449.10MB
F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
04:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0,1 row-size=454B cardinality=9001822500000
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=361.10MB mem-reservation=0B
02:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
| mem-estimate=273.10MB mem-reservation=0B
| tuple-ids=0,1 row-size=454B cardinality=9001822500000
|
|--03:EXCHANGE [BROADCAST]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=191B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
| Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
| 01:SCAN HDFS [tpch.orders, RANDOM]
| partitions=1/1 files=1 size=162.56MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=191B cardinality=1500000
|
00:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=898.21MB
F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
04:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0,1 row-size=454B cardinality=9001822500000
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=722.21MB mem-reservation=0B
02:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
| join table id: 00
| mem-estimate=273.10MB mem-reservation=0B
| tuple-ids=0,1 row-size=454B cardinality=9001822500000
|
|--F03:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| | Per-Host Resources: included in parent fragment
| JOIN BUILD
| | join-table-id=00 plan-id=01 cohort-id=01
| | mem-estimate=0B mem-reservation=0B
| |
| 03:EXCHANGE [BROADCAST]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=191B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| Per-Host Resources: mem-estimate=176.00MB mem-reservation=0B
| 01:SCAN HDFS [tpch.orders, RANDOM]
| partitions=1/1 files=1 size=162.56MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=191B cardinality=1500000
|
00:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=263B cardinality=6001215
====
# Empty set node
select * from functional.alltypes where 1 = 2
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=10.00MB
Codegen disabled by planner
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
00:EMPTYSET
mem-estimate=0B mem-reservation=0B
tuple-ids=0 row-size=0B cardinality=0
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=10.00MB
Codegen disabled by planner
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
00:EMPTYSET
mem-estimate=0B mem-reservation=0B
tuple-ids=0 row-size=0B cardinality=0
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=10.00MB
Codegen disabled by planner
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
00:EMPTYSET
mem-estimate=0B mem-reservation=0B
tuple-ids=0 row-size=0B cardinality=0
====
# Analytic function
select max(tinyint_col) over(partition by int_col)
from functional.alltypes
---- PLAN
Max Per-Host Resource Reservation: Memory=10.00MB
Per-Host Resource Estimates: Memory=26.00MB
Codegen disabled by planner
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=26.00MB mem-reservation=10.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
02:ANALYTIC
| functions: max(tinyint_col)
| partition by: int_col
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=3,2 row-size=6B cardinality=7300
|
01:SORT
| order by: int_col ASC NULLS FIRST
| mem-estimate=6.00MB mem-reservation=6.00MB spill-buffer=2.00MB
| tuple-ids=3 row-size=5B cardinality=7300
|
00:SCAN HDFS [functional.alltypes]
partitions=24/24 files=24 size=478.45KB
stats-rows=7300 extrapolated-rows=disabled
table stats: rows=7300 size=478.45KB
column stats: all
mem-estimate=16.00MB mem-reservation=0B
tuple-ids=0 row-size=5B cardinality=7300
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=10.00MB
Per-Host Resource Estimates: Memory=26.00MB
Codegen disabled by planner
F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
04:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=3,2 row-size=6B cardinality=7300
|
F01:PLAN FRAGMENT [HASH(int_col)] hosts=3 instances=3
Per-Host Resources: mem-estimate=10.00MB mem-reservation=10.00MB
02:ANALYTIC
| functions: max(tinyint_col)
| partition by: int_col
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=3,2 row-size=6B cardinality=7300
|
01:SORT
| order by: int_col ASC NULLS FIRST
| mem-estimate=6.00MB mem-reservation=6.00MB spill-buffer=2.00MB
| tuple-ids=3 row-size=5B cardinality=7300
|
03:EXCHANGE [HASH(int_col)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=5B cardinality=7300
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=16.00MB mem-reservation=0B
00:SCAN HDFS [functional.alltypes, RANDOM]
partitions=24/24 files=24 size=478.45KB
stats-rows=7300 extrapolated-rows=disabled
table stats: rows=7300 size=478.45KB
column stats: all
mem-estimate=16.00MB mem-reservation=0B
tuple-ids=0 row-size=5B cardinality=7300
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=20.00MB
Per-Host Resource Estimates: Memory=52.00MB
Codegen disabled by planner
F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
04:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=3,2 row-size=6B cardinality=7300
|
F01:PLAN FRAGMENT [HASH(int_col)] hosts=3 instances=6
Per-Host Resources: mem-estimate=20.00MB mem-reservation=20.00MB
02:ANALYTIC
| functions: max(tinyint_col)
| partition by: int_col
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=3,2 row-size=6B cardinality=7300
|
01:SORT
| order by: int_col ASC NULLS FIRST
| mem-estimate=6.00MB mem-reservation=6.00MB spill-buffer=2.00MB
| tuple-ids=3 row-size=5B cardinality=7300
|
03:EXCHANGE [HASH(int_col)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=5B cardinality=7300
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=32.00MB mem-reservation=0B
00:SCAN HDFS [functional.alltypes, RANDOM]
partitions=24/24 files=24 size=478.45KB
stats-rows=7300 extrapolated-rows=disabled
table stats: rows=7300 size=478.45KB
column stats: all
mem-estimate=16.00MB mem-reservation=0B
tuple-ids=0 row-size=5B cardinality=7300
====
# Pipeline of blocking operators from analytic fns. Blocking operators break
# the pipeline so they do not all consume resources concurrently.
select *, row_number() over (order by o_totalprice) rnum_price,
row_number() over (order by o_orderdate) rnum_date,
row_number() over (order by o_orderpriority) rnum_priority
from tpch_parquet.orders
---- PLAN
Max Per-Host Resource Reservation: Memory=36.00MB
Per-Host Resource Estimates: Memory=70.00MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=70.00MB mem-reservation=36.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
06:ANALYTIC
| functions: row_number()
| order by: o_orderpriority ASC
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=10,5 row-size=215B cardinality=1500000
|
05:SORT
| order by: o_orderpriority ASC
| mem-estimate=18.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=10 row-size=207B cardinality=1500000
|
04:ANALYTIC
| functions: row_number()
| order by: o_orderdate ASC
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=8,4 row-size=207B cardinality=1500000
|
03:SORT
| order by: o_orderdate ASC
| mem-estimate=18.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=8 row-size=199B cardinality=1500000
|
02:ANALYTIC
| functions: row_number()
| order by: o_totalprice ASC
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=6,3 row-size=199B cardinality=1500000
|
01:SORT
| order by: o_totalprice ASC
| mem-estimate=18.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=191B cardinality=1500000
|
00:SCAN HDFS [tpch_parquet.orders]
partitions=1/1 files=2 size=54.20MB
stats-rows=1500000 extrapolated-rows=disabled
table stats: rows=1500000 size=54.20MB
column stats: all
mem-estimate=40.00MB mem-reservation=0B
tuple-ids=0 row-size=191B cardinality=1500000
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=44.00MB
Per-Host Resource Estimates: Memory=102.00MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=44.00MB mem-reservation=32.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
06:ANALYTIC
| functions: row_number()
| order by: o_orderpriority ASC
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=10,5 row-size=215B cardinality=1500000
|
05:SORT
| order by: o_orderpriority ASC
| mem-estimate=18.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=10 row-size=207B cardinality=1500000
|
04:ANALYTIC
| functions: row_number()
| order by: o_orderdate ASC
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=8,4 row-size=207B cardinality=1500000
|
03:SORT
| order by: o_orderdate ASC
| mem-estimate=18.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=8 row-size=199B cardinality=1500000
|
02:ANALYTIC
| functions: row_number()
| order by: o_totalprice ASC
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=6,3 row-size=199B cardinality=1500000
|
07:MERGING-EXCHANGE [UNPARTITIONED]
| order by: o_totalprice ASC
| mem-estimate=0B mem-reservation=0B
| tuple-ids=6 row-size=191B cardinality=1500000
|
F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
Per-Host Resources: mem-estimate=58.00MB mem-reservation=12.00MB
01:SORT
| order by: o_totalprice ASC
| mem-estimate=18.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=191B cardinality=1500000
|
00:SCAN HDFS [tpch_parquet.orders, RANDOM]
partitions=1/1 files=2 size=54.20MB
stats-rows=1500000 extrapolated-rows=disabled
table stats: rows=1500000 size=54.20MB
column stats: all
mem-estimate=40.00MB mem-reservation=0B
tuple-ids=0 row-size=191B cardinality=1500000
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=56.00MB
Per-Host Resource Estimates: Memory=160.00MB
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=44.00MB mem-reservation=32.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
06:ANALYTIC
| functions: row_number()
| order by: o_orderpriority ASC
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=10,5 row-size=215B cardinality=1500000
|
05:SORT
| order by: o_orderpriority ASC
| mem-estimate=18.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=10 row-size=207B cardinality=1500000
|
04:ANALYTIC
| functions: row_number()
| order by: o_orderdate ASC
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=8,4 row-size=207B cardinality=1500000
|
03:SORT
| order by: o_orderdate ASC
| mem-estimate=18.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=8 row-size=199B cardinality=1500000
|
02:ANALYTIC
| functions: row_number()
| order by: o_totalprice ASC
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=6,3 row-size=199B cardinality=1500000
|
07:MERGING-EXCHANGE [UNPARTITIONED]
| order by: o_totalprice ASC
| mem-estimate=0B mem-reservation=0B
| tuple-ids=6 row-size=191B cardinality=1500000
|
F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
Per-Host Resources: mem-estimate=116.00MB mem-reservation=24.00MB
01:SORT
| order by: o_totalprice ASC
| mem-estimate=18.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=191B cardinality=1500000
|
00:SCAN HDFS [tpch_parquet.orders, RANDOM]
partitions=1/1 files=2 size=54.20MB
stats-rows=1500000 extrapolated-rows=disabled
table stats: rows=1500000 size=54.20MB
column stats: all
mem-estimate=40.00MB mem-reservation=0B
tuple-ids=0 row-size=191B cardinality=1500000
====
# Union with non-trivial branches: each branch executes sequentially within fragment.
select distinct l_orderkey, l_partkey, l_suppkey, l_linenumber, l_comment
from tpch_parquet.lineitem join tpch_parquet.orders on l_orderkey = o_orderkey
where l_tax > 10
union all
select l_orderkey, l_partkey, l_suppkey, l_linenumber, l_comment
from tpch_parquet.lineitem join tpch_parquet.orders on l_orderkey = o_orderkey
where o_orderpriority = '2-HIGH'
union all
select l_orderkey, l_partkey, l_suppkey, l_linenumber, l_comment
from tpch_parquet.lineitem join tpch_parquet.orders on l_orderkey = o_orderkey
where l_shipmode = 'F'
---- PLAN
Max Per-Host Resource Reservation: Memory=51.00MB
Per-Host Resource Estimates: Memory=139.58MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=139.58MB mem-reservation=51.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
00:UNION
| pass-through-operands: 04
| mem-estimate=0B mem-reservation=0B
| tuple-ids=7 row-size=70B cardinality=2549844
|
|--10:HASH JOIN [INNER JOIN]
| | hash predicates: l_orderkey = o_orderkey
| | fk/pk conjuncts: l_orderkey = o_orderkey
| | runtime filters: RF002 <- o_orderkey
| | mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB
| | tuple-ids=5,6 row-size=99B cardinality=822530
| |
| |--09:SCAN HDFS [tpch_parquet.orders]
| | partitions=1/1 files=2 size=54.20MB
| | stats-rows=1500000 extrapolated-rows=disabled
| | table stats: rows=1500000 size=54.20MB
| | column stats: all
| | mem-estimate=40.00MB mem-reservation=0B
| | tuple-ids=6 row-size=8B cardinality=1500000
| |
| 08:SCAN HDFS [tpch_parquet.lineitem]
| partitions=1/1 files=3 size=193.92MB
| predicates: l_shipmode = 'F'
| runtime filters: RF002 -> l_orderkey
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=193.92MB
| column stats: all
| parquet statistics predicates: l_shipmode = 'F'
| parquet dictionary predicates: l_shipmode = 'F'
| mem-estimate=80.00MB mem-reservation=0B
| tuple-ids=5 row-size=91B cardinality=857316
|
|--07:HASH JOIN [INNER JOIN]
| | hash predicates: l_orderkey = o_orderkey
| | fk/pk conjuncts: l_orderkey = o_orderkey
| | runtime filters: RF001 <- o_orderkey
| | mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB
| | tuple-ids=3,4 row-size=103B cardinality=1151542
| |
| |--06:SCAN HDFS [tpch_parquet.orders]
| | partitions=1/1 files=2 size=54.20MB
| | predicates: o_orderpriority = '2-HIGH'
| | stats-rows=1500000 extrapolated-rows=disabled
| | table stats: rows=1500000 size=54.20MB
| | column stats: all
| | parquet statistics predicates: o_orderpriority = '2-HIGH'
| | parquet dictionary predicates: o_orderpriority = '2-HIGH'
| | mem-estimate=40.00MB mem-reservation=0B
| | tuple-ids=4 row-size=32B cardinality=300000
| |
| 05:SCAN HDFS [tpch_parquet.lineitem]
| partitions=1/1 files=3 size=193.92MB
| runtime filters: RF001 -> l_orderkey
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=193.92MB
| column stats: all
| mem-estimate=80.00MB mem-reservation=0B
| tuple-ids=3 row-size=70B cardinality=6001215
|
04:AGGREGATE [FINALIZE]
| group by: l_orderkey, l_partkey, l_suppkey, l_linenumber, l_comment
| mem-estimate=42.58MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=2 row-size=70B cardinality=575772
|
03:HASH JOIN [INNER JOIN]
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF000 <- o_orderkey
| mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB
| tuple-ids=0,1 row-size=86B cardinality=575772
|
|--02:SCAN HDFS [tpch_parquet.orders]
| partitions=1/1 files=2 size=54.20MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=54.20MB
| column stats: all
| mem-estimate=40.00MB mem-reservation=0B
| tuple-ids=1 row-size=8B cardinality=1500000
|
01:SCAN HDFS [tpch_parquet.lineitem]
partitions=1/1 files=3 size=193.92MB
predicates: l_tax > 10
runtime filters: RF000 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
parquet statistics predicates: l_tax > 10
parquet dictionary predicates: l_tax > 10
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=78B cardinality=600122
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=72.75MB
Per-Host Resource Estimates: Memory=344.33MB
F09:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
17:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=7 row-size=70B cardinality=2549844
|
F08:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=97.00MB mem-reservation=34.00MB
00:UNION
| pass-through-operands: 14
| mem-estimate=0B mem-reservation=0B
| tuple-ids=7 row-size=70B cardinality=2549844
|
|--10:HASH JOIN [INNER JOIN, BROADCAST]
| | hash predicates: l_orderkey = o_orderkey
| | fk/pk conjuncts: l_orderkey = o_orderkey
| | runtime filters: RF002 <- o_orderkey
| | mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB
| | tuple-ids=5,6 row-size=99B cardinality=822530
| |
| |--16:EXCHANGE [BROADCAST]
| | | mem-estimate=0B mem-reservation=0B
| | | tuple-ids=6 row-size=8B cardinality=1500000
| | |
| | F07:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
| | Per-Host Resources: mem-estimate=40.00MB mem-reservation=0B
| | 09:SCAN HDFS [tpch_parquet.orders, RANDOM]
| | partitions=1/1 files=2 size=54.20MB
| | stats-rows=1500000 extrapolated-rows=disabled
| | table stats: rows=1500000 size=54.20MB
| | column stats: all
| | mem-estimate=40.00MB mem-reservation=0B
| | tuple-ids=6 row-size=8B cardinality=1500000
| |
| 08:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
| partitions=1/1 files=3 size=193.92MB
| predicates: l_shipmode = 'F'
| runtime filters: RF002 -> l_orderkey
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=193.92MB
| column stats: all
| parquet statistics predicates: l_shipmode = 'F'
| parquet dictionary predicates: l_shipmode = 'F'
| mem-estimate=80.00MB mem-reservation=0B
| tuple-ids=5 row-size=91B cardinality=857316
|
|--07:HASH JOIN [INNER JOIN, BROADCAST]
| | hash predicates: l_orderkey = o_orderkey
| | fk/pk conjuncts: l_orderkey = o_orderkey
| | runtime filters: RF001 <- o_orderkey
| | mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB
| | tuple-ids=3,4 row-size=103B cardinality=1151542
| |
| |--15:EXCHANGE [BROADCAST]
| | | mem-estimate=0B mem-reservation=0B
| | | tuple-ids=4 row-size=32B cardinality=300000
| | |
| | F05:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
| | Per-Host Resources: mem-estimate=40.00MB mem-reservation=0B
| | 06:SCAN HDFS [tpch_parquet.orders, RANDOM]
| | partitions=1/1 files=2 size=54.20MB
| | predicates: o_orderpriority = '2-HIGH'
| | stats-rows=1500000 extrapolated-rows=disabled
| | table stats: rows=1500000 size=54.20MB
| | column stats: all
| | parquet statistics predicates: o_orderpriority = '2-HIGH'
| | parquet dictionary predicates: o_orderpriority = '2-HIGH'
| | mem-estimate=40.00MB mem-reservation=0B
| | tuple-ids=4 row-size=32B cardinality=300000
| |
| 05:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
| partitions=1/1 files=3 size=193.92MB
| runtime filters: RF001 -> l_orderkey
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=193.92MB
| column stats: all
| mem-estimate=80.00MB mem-reservation=0B
| tuple-ids=3 row-size=70B cardinality=6001215
|
14:AGGREGATE [FINALIZE]
| group by: l_orderkey, l_partkey, l_suppkey, l_linenumber, l_comment
| mem-estimate=42.58MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=2 row-size=70B cardinality=575772
|
13:EXCHANGE [HASH(l_orderkey,l_partkey,l_suppkey,l_linenumber,l_comment)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=2 row-size=70B cardinality=575772
|
F02:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=3
Per-Host Resources: mem-estimate=47.33MB mem-reservation=38.75MB
04:AGGREGATE [STREAMING]
| group by: l_orderkey, l_partkey, l_suppkey, l_linenumber, l_comment
| mem-estimate=42.58MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=2 row-size=70B cardinality=575772
|
03:HASH JOIN [INNER JOIN, PARTITIONED]
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF000 <- o_orderkey
| mem-estimate=4.75MB mem-reservation=4.75MB spill-buffer=256.00KB
| tuple-ids=0,1 row-size=86B cardinality=575772
|
|--12:EXCHANGE [HASH(o_orderkey)]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=8B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
| Per-Host Resources: mem-estimate=40.00MB mem-reservation=0B
| 02:SCAN HDFS [tpch_parquet.orders, RANDOM]
| partitions=1/1 files=2 size=54.20MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=54.20MB
| column stats: all
| mem-estimate=40.00MB mem-reservation=0B
| tuple-ids=1 row-size=8B cardinality=1500000
|
11:EXCHANGE [HASH(l_orderkey)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=78B cardinality=600122
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=80.00MB mem-reservation=0B
01:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
predicates: l_tax > 10
runtime filters: RF000 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
parquet statistics predicates: l_tax > 10
parquet dictionary predicates: l_tax > 10
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=78B cardinality=600122
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=141.75MB
Per-Host Resource Estimates: Memory=684.91MB
F09:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
17:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=7 row-size=70B cardinality=2549844
|
F08:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=194.00MB mem-reservation=68.00MB
00:UNION
| pass-through-operands: 14
| mem-estimate=0B mem-reservation=0B
| tuple-ids=7 row-size=70B cardinality=2549844
|
|--10:HASH JOIN [INNER JOIN, BROADCAST]
| | hash-table-id=01
| | hash predicates: l_orderkey = o_orderkey
| | fk/pk conjuncts: l_orderkey = o_orderkey
| | runtime filters: RF002 <- o_orderkey
| | mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB
| | tuple-ids=5,6 row-size=99B cardinality=822530
| |
| |--F11:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| | | Per-Host Resources: included in parent fragment
| | JOIN BUILD
| | | join-table-id=01 plan-id=02 cohort-id=01
| | | build expressions: o_orderkey
| | | mem-estimate=0B mem-reservation=0B
| | |
| | 16:EXCHANGE [BROADCAST]
| | | mem-estimate=0B mem-reservation=0B
| | | tuple-ids=6 row-size=8B cardinality=1500000
| | |
| | F07:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| | Per-Host Resources: mem-estimate=80.00MB mem-reservation=0B
| | 09:SCAN HDFS [tpch_parquet.orders, RANDOM]
| | partitions=1/1 files=2 size=54.20MB
| | stats-rows=1500000 extrapolated-rows=disabled
| | table stats: rows=1500000 size=54.20MB
| | column stats: all
| | mem-estimate=40.00MB mem-reservation=0B
| | tuple-ids=6 row-size=8B cardinality=1500000
| |
| 08:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
| partitions=1/1 files=3 size=193.92MB
| predicates: l_shipmode = 'F'
| runtime filters: RF002 -> l_orderkey
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=193.92MB
| column stats: all
| parquet statistics predicates: l_shipmode = 'F'
| parquet dictionary predicates: l_shipmode = 'F'
| mem-estimate=80.00MB mem-reservation=0B
| tuple-ids=5 row-size=91B cardinality=857316
|
|--07:HASH JOIN [INNER JOIN, BROADCAST]
| | hash-table-id=00
| | hash predicates: l_orderkey = o_orderkey
| | fk/pk conjuncts: l_orderkey = o_orderkey
| | runtime filters: RF001 <- o_orderkey
| | mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB
| | tuple-ids=3,4 row-size=103B cardinality=1151542
| |
| |--F10:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| | | Per-Host Resources: included in parent fragment
| | JOIN BUILD
| | | join-table-id=00 plan-id=01 cohort-id=01
| | | build expressions: o_orderkey
| | | mem-estimate=0B mem-reservation=0B
| | |
| | 15:EXCHANGE [BROADCAST]
| | | mem-estimate=0B mem-reservation=0B
| | | tuple-ids=4 row-size=32B cardinality=300000
| | |
| | F05:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| | Per-Host Resources: mem-estimate=80.00MB mem-reservation=0B
| | 06:SCAN HDFS [tpch_parquet.orders, RANDOM]
| | partitions=1/1 files=2 size=54.20MB
| | predicates: o_orderpriority = '2-HIGH'
| | stats-rows=1500000 extrapolated-rows=disabled
| | table stats: rows=1500000 size=54.20MB
| | column stats: all
| | parquet statistics predicates: o_orderpriority = '2-HIGH'
| | parquet dictionary predicates: o_orderpriority = '2-HIGH'
| | mem-estimate=40.00MB mem-reservation=0B
| | tuple-ids=4 row-size=32B cardinality=300000
| |
| 05:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
| partitions=1/1 files=3 size=193.92MB
| runtime filters: RF001 -> l_orderkey
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=193.92MB
| column stats: all
| mem-estimate=80.00MB mem-reservation=0B
| tuple-ids=3 row-size=70B cardinality=6001215
|
14:AGGREGATE [FINALIZE]
| group by: l_orderkey, l_partkey, l_suppkey, l_linenumber, l_comment
| mem-estimate=42.58MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=2 row-size=70B cardinality=575772
|
13:EXCHANGE [HASH(l_orderkey,l_partkey,l_suppkey,l_linenumber,l_comment)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=2 row-size=70B cardinality=575772
|
F02:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=6
Per-Host Resources: mem-estimate=90.91MB mem-reservation=73.75MB
04:AGGREGATE [STREAMING]
| group by: l_orderkey, l_partkey, l_suppkey, l_linenumber, l_comment
| mem-estimate=42.58MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=2 row-size=70B cardinality=575772
|
03:HASH JOIN [INNER JOIN, PARTITIONED]
| hash-table-id=02
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF000 <- o_orderkey
| mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB
| tuple-ids=0,1 row-size=86B cardinality=575772
|
|--F12:PLAN FRAGMENT [HASH(l_orderkey)] hosts=2 instances=4
| | Per-Host Resources: included in parent fragment
| JOIN BUILD
| | join-table-id=02 plan-id=03 cohort-id=01
| | build expressions: o_orderkey
| | mem-estimate=0B mem-reservation=0B
| |
| 12:EXCHANGE [HASH(o_orderkey)]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=8B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| Per-Host Resources: mem-estimate=80.00MB mem-reservation=0B
| 02:SCAN HDFS [tpch_parquet.orders, RANDOM]
| partitions=1/1 files=2 size=54.20MB
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=54.20MB
| column stats: all
| mem-estimate=40.00MB mem-reservation=0B
| tuple-ids=1 row-size=8B cardinality=1500000
|
11:EXCHANGE [HASH(l_orderkey)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=78B cardinality=600122
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=160.00MB mem-reservation=0B
01:SCAN HDFS [tpch_parquet.lineitem, RANDOM]
partitions=1/1 files=3 size=193.92MB
predicates: l_tax > 10
runtime filters: RF000 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=193.92MB
column stats: all
parquet statistics predicates: l_tax > 10
parquet dictionary predicates: l_tax > 10
mem-estimate=80.00MB mem-reservation=0B
tuple-ids=0 row-size=78B cardinality=600122
====
# TPC-H Q18: Pipeline of joins with some non-trivial subtrees on right side of joins
select
c_name,
c_custkey,
o_orderkey,
o_orderdate,
o_totalprice,
sum(l_quantity)
from
tpch.customer,
tpch.orders,
tpch.lineitem
where
o_orderkey in (
select
l_orderkey
from
tpch.lineitem
group by
l_orderkey
having
sum(l_quantity) > 300
)
and c_custkey = o_custkey
and o_orderkey = l_orderkey
group by
c_name,
c_custkey,
o_orderkey,
o_orderdate,
o_totalprice
order by
o_totalprice desc,
o_orderdate
limit 100
---- PLAN
Max Per-Host Resource Reservation: Memory=81.25MB
Per-Host Resource Estimates: Memory=393.18MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=393.18MB mem-reservation=81.25MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
09:TOP-N [LIMIT=100]
| order by: o_totalprice DESC, o_orderdate ASC
| mem-estimate=9.77KB mem-reservation=0B
| tuple-ids=7 row-size=100B cardinality=100
|
08:AGGREGATE [FINALIZE]
| output: sum(l_quantity)
| group by: c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice
| mem-estimate=60.40MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=100B cardinality=575772
|
07:HASH JOIN [LEFT SEMI JOIN]
| hash predicates: o_orderkey = l_orderkey
| runtime filters: RF000 <- l_orderkey
| mem-estimate=4.75MB mem-reservation=4.75MB spill-buffer=256.00KB
| tuple-ids=2,1,0 row-size=108B cardinality=575772
|
|--04:AGGREGATE [FINALIZE]
| | output: sum(l_quantity)
| | group by: l_orderkey
| | having: sum(l_quantity) > 300
| | mem-estimate=10.00MB mem-reservation=4.75MB spill-buffer=256.00KB
| | tuple-ids=4 row-size=24B cardinality=156344
| |
| 03:SCAN HDFS [tpch.lineitem]
| partitions=1/1 files=1 size=718.94MB
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=718.94MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=3 row-size=16B cardinality=6001215
|
06:HASH JOIN [INNER JOIN]
| hash predicates: o_custkey = c_custkey
| fk/pk conjuncts: o_custkey = c_custkey
| runtime filters: RF001 <- c_custkey
| mem-estimate=8.50MB mem-reservation=8.50MB spill-buffer=512.00KB
| tuple-ids=2,1,0 row-size=108B cardinality=5757710
|
|--00:SCAN HDFS [tpch.customer]
| partitions=1/1 files=1 size=23.08MB
| stats-rows=150000 extrapolated-rows=disabled
| table stats: rows=150000 size=23.08MB
| column stats: all
| mem-estimate=32.00MB mem-reservation=0B
| tuple-ids=0 row-size=42B cardinality=150000
|
05:HASH JOIN [INNER JOIN]
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF002 <- o_orderkey
| mem-estimate=78.68MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=2,1 row-size=66B cardinality=5757710
|
|--01:SCAN HDFS [tpch.orders]
| partitions=1/1 files=1 size=162.56MB
| runtime filters: RF000 -> o_orderkey, RF001 -> o_custkey
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=50B cardinality=1500000
|
02:SCAN HDFS [tpch.lineitem]
partitions=1/1 files=1 size=718.94MB
runtime filters: RF000 -> tpch.lineitem.l_orderkey, RF002 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=2 row-size=16B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=152.12MB
Per-Host Resource Estimates: Memory=511.55MB
F07:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
17:MERGING-EXCHANGE [UNPARTITIONED]
| order by: o_totalprice DESC, o_orderdate ASC
| limit: 100
| mem-estimate=0B mem-reservation=0B
| tuple-ids=7 row-size=100B cardinality=100
|
F06:PLAN FRAGMENT [HASH(c_name,c_custkey,o_orderkey,o_orderdate,o_totalprice)] hosts=3 instances=3
Per-Host Resources: mem-estimate=60.41MB mem-reservation=34.00MB
09:TOP-N [LIMIT=100]
| order by: o_totalprice DESC, o_orderdate ASC
| mem-estimate=9.77KB mem-reservation=0B
| tuple-ids=7 row-size=100B cardinality=100
|
16:AGGREGATE [FINALIZE]
| output: sum:merge(l_quantity)
| group by: c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice
| mem-estimate=60.40MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=100B cardinality=575772
|
15:EXCHANGE [HASH(c_name,c_custkey,o_orderkey,o_orderdate,o_totalprice)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=6 row-size=100B cardinality=575772
|
F02:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=3
Per-Host Resources: mem-estimate=115.78MB mem-reservation=84.12MB
08:AGGREGATE [STREAMING]
| output: sum(l_quantity)
| group by: c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice
| mem-estimate=60.40MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=100B cardinality=575772
|
07:HASH JOIN [LEFT SEMI JOIN, PARTITIONED]
| hash predicates: o_orderkey = l_orderkey
| runtime filters: RF000 <- l_orderkey
| mem-estimate=2.88MB mem-reservation=2.88MB spill-buffer=128.00KB
| tuple-ids=2,1,0 row-size=108B cardinality=575772
|
|--14:AGGREGATE [FINALIZE]
| | output: sum:merge(l_quantity)
| | group by: l_orderkey
| | having: sum(l_quantity) > 300
| | mem-estimate=10.00MB mem-reservation=4.75MB spill-buffer=256.00KB
| | tuple-ids=4 row-size=24B cardinality=156344
| |
| 13:EXCHANGE [HASH(l_orderkey)]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=4 row-size=24B cardinality=1563438
| |
| F04:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
| Per-Host Resources: mem-estimate=127.36MB mem-reservation=34.00MB
| 04:AGGREGATE [STREAMING]
| | output: sum(l_quantity)
| | group by: l_orderkey
| | mem-estimate=39.36MB mem-reservation=34.00MB spill-buffer=2.00MB
| | tuple-ids=4 row-size=24B cardinality=1563438
| |
| 03:SCAN HDFS [tpch.lineitem, RANDOM]
| partitions=1/1 files=1 size=718.94MB
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=718.94MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=3 row-size=16B cardinality=6001215
|
06:HASH JOIN [INNER JOIN, BROADCAST]
| hash predicates: o_custkey = c_custkey
| fk/pk conjuncts: o_custkey = c_custkey
| runtime filters: RF001 <- c_custkey
| mem-estimate=8.50MB mem-reservation=8.50MB spill-buffer=512.00KB
| tuple-ids=2,1,0 row-size=108B cardinality=5757710
|
|--12:EXCHANGE [BROADCAST]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=0 row-size=42B cardinality=150000
| |
| F03:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
| Per-Host Resources: mem-estimate=32.00MB mem-reservation=0B
| 00:SCAN HDFS [tpch.customer, RANDOM]
| partitions=1/1 files=1 size=23.08MB
| stats-rows=150000 extrapolated-rows=disabled
| table stats: rows=150000 size=23.08MB
| column stats: all
| mem-estimate=32.00MB mem-reservation=0B
| tuple-ids=0 row-size=42B cardinality=150000
|
05:HASH JOIN [INNER JOIN, PARTITIONED]
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF002 <- o_orderkey
| mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=2,1 row-size=66B cardinality=5757710
|
|--11:EXCHANGE [HASH(o_orderkey)]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=50B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
| Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
| 01:SCAN HDFS [tpch.orders, RANDOM]
| partitions=1/1 files=1 size=162.56MB
| runtime filters: RF000 -> o_orderkey, RF001 -> o_custkey
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=50B cardinality=1500000
|
10:EXCHANGE [HASH(l_orderkey)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=2 row-size=16B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
02:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
runtime filters: RF000 -> tpch.lineitem.l_orderkey, RF002 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=2 row-size=16B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=258.88MB
Per-Host Resource Estimates: Memory=967.22MB
F07:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
17:MERGING-EXCHANGE [UNPARTITIONED]
| order by: o_totalprice DESC, o_orderdate ASC
| limit: 100
| mem-estimate=0B mem-reservation=0B
| tuple-ids=7 row-size=100B cardinality=100
|
F06:PLAN FRAGMENT [HASH(c_name,c_custkey,o_orderkey,o_orderdate,o_totalprice)] hosts=3 instances=6
Per-Host Resources: mem-estimate=120.82MB mem-reservation=68.00MB
09:TOP-N [LIMIT=100]
| order by: o_totalprice DESC, o_orderdate ASC
| mem-estimate=9.77KB mem-reservation=0B
| tuple-ids=7 row-size=100B cardinality=100
|
16:AGGREGATE [FINALIZE]
| output: sum:merge(l_quantity)
| group by: c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice
| mem-estimate=60.40MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=100B cardinality=575772
|
15:EXCHANGE [HASH(c_name,c_custkey,o_orderkey,o_orderdate,o_totalprice)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=6 row-size=100B cardinality=575772
|
F02:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=6
Per-Host Resources: mem-estimate=175.68MB mem-reservation=122.88MB
08:AGGREGATE [STREAMING]
| output: sum(l_quantity)
| group by: c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice
| mem-estimate=60.40MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=100B cardinality=575772
|
07:HASH JOIN [LEFT SEMI JOIN, PARTITIONED]
| hash-table-id=00
| hash predicates: o_orderkey = l_orderkey
| runtime filters: RF000 <- l_orderkey
| mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB
| tuple-ids=2,1,0 row-size=108B cardinality=575772
|
|--F08:PLAN FRAGMENT [HASH(l_orderkey)] hosts=3 instances=6
| | Per-Host Resources: included in parent fragment
| JOIN BUILD
| | join-table-id=00 plan-id=01 cohort-id=01
| | build expressions: l_orderkey
| | mem-estimate=0B mem-reservation=0B
| |
| 14:AGGREGATE [FINALIZE]
| | output: sum:merge(l_quantity)
| | group by: l_orderkey
| | having: sum(l_quantity) > 300
| | mem-estimate=10.00MB mem-reservation=4.75MB spill-buffer=256.00KB
| | tuple-ids=4 row-size=24B cardinality=156344
| |
| 13:EXCHANGE [HASH(l_orderkey)]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=4 row-size=24B cardinality=1563438
| |
| F04:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
| Per-Host Resources: mem-estimate=254.73MB mem-reservation=68.00MB
| 04:AGGREGATE [STREAMING]
| | output: sum(l_quantity)
| | group by: l_orderkey
| | mem-estimate=39.36MB mem-reservation=34.00MB spill-buffer=2.00MB
| | tuple-ids=4 row-size=24B cardinality=1563438
| |
| 03:SCAN HDFS [tpch.lineitem, RANDOM]
| partitions=1/1 files=1 size=718.94MB
| stats-rows=6001215 extrapolated-rows=disabled
| table stats: rows=6001215 size=718.94MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=3 row-size=16B cardinality=6001215
|
06:HASH JOIN [INNER JOIN, BROADCAST]
| hash-table-id=01
| hash predicates: o_custkey = c_custkey
| fk/pk conjuncts: o_custkey = c_custkey
| runtime filters: RF001 <- c_custkey
| mem-estimate=8.50MB mem-reservation=8.50MB spill-buffer=512.00KB
| tuple-ids=2,1,0 row-size=108B cardinality=5757710
|
|--F09:PLAN FRAGMENT [HASH(l_orderkey)] hosts=1 instances=2
| | Per-Host Resources: included in parent fragment
| JOIN BUILD
| | join-table-id=01 plan-id=02 cohort-id=01
| | build expressions: c_custkey
| | mem-estimate=0B mem-reservation=0B
| |
| 12:EXCHANGE [BROADCAST]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=0 row-size=42B cardinality=150000
| |
| F03:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
| Per-Host Resources: mem-estimate=64.00MB mem-reservation=0B
| 00:SCAN HDFS [tpch.customer, RANDOM]
| partitions=1/1 files=1 size=23.08MB
| stats-rows=150000 extrapolated-rows=disabled
| table stats: rows=150000 size=23.08MB
| column stats: all
| mem-estimate=32.00MB mem-reservation=0B
| tuple-ids=0 row-size=42B cardinality=150000
|
05:HASH JOIN [INNER JOIN, PARTITIONED]
| hash-table-id=02
| hash predicates: l_orderkey = o_orderkey
| fk/pk conjuncts: l_orderkey = o_orderkey
| runtime filters: RF002 <- o_orderkey
| mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB
| tuple-ids=2,1 row-size=66B cardinality=5757710
|
|--F10:PLAN FRAGMENT [HASH(l_orderkey)] hosts=2 instances=4
| | Per-Host Resources: included in parent fragment
| JOIN BUILD
| | join-table-id=02 plan-id=03 cohort-id=01
| | build expressions: o_orderkey
| | mem-estimate=0B mem-reservation=0B
| |
| 11:EXCHANGE [HASH(o_orderkey)]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=50B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| Per-Host Resources: mem-estimate=176.00MB mem-reservation=0B
| 01:SCAN HDFS [tpch.orders, RANDOM]
| partitions=1/1 files=1 size=162.56MB
| runtime filters: RF000 -> o_orderkey, RF001 -> o_custkey
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=162.56MB
| column stats: all
| mem-estimate=88.00MB mem-reservation=0B
| tuple-ids=1 row-size=50B cardinality=1500000
|
10:EXCHANGE [HASH(l_orderkey)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=2 row-size=16B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=176.00MB mem-reservation=0B
02:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
runtime filters: RF000 -> tpch.lineitem.l_orderkey, RF002 -> l_orderkey
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=2 row-size=16B cardinality=6001215
====
# Unpartitioned HDFS insert
insert into table functional.alltypesnopart
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col,
float_col, double_col, date_string_col, string_col, timestamp_col
from functional.alltypes
where year=2009 and month=05
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=16.03MB
Codegen disabled by planner
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=16.03MB mem-reservation=0B
WRITE TO HDFS [functional.alltypesnopart, OVERWRITE=false]
| partitions=1
| mem-estimate=26.94KB mem-reservation=0B
|
00:SCAN HDFS [functional.alltypes]
partitions=1/24 files=1 size=20.36KB
stats-rows=310 extrapolated-rows=disabled
table stats: rows=7300 size=478.45KB
column stats: all
mem-estimate=16.00MB mem-reservation=0B
tuple-ids=0 row-size=89B cardinality=310
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=16.03MB
Codegen disabled by planner
F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
| Per-Host Resources: mem-estimate=16.03MB mem-reservation=0B
WRITE TO HDFS [functional.alltypesnopart, OVERWRITE=false]
| partitions=1
| mem-estimate=26.94KB mem-reservation=0B
|
00:SCAN HDFS [functional.alltypes, RANDOM]
partitions=1/24 files=1 size=20.36KB
stats-rows=310 extrapolated-rows=disabled
table stats: rows=7300 size=478.45KB
column stats: all
mem-estimate=16.00MB mem-reservation=0B
tuple-ids=0 row-size=89B cardinality=310
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=32.03MB
Codegen disabled by planner
F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
| Per-Host Resources: mem-estimate=32.03MB mem-reservation=0B
WRITE TO HDFS [functional.alltypesnopart, OVERWRITE=false]
| partitions=1
| mem-estimate=13.47KB mem-reservation=0B
|
00:SCAN HDFS [functional.alltypes, RANDOM]
partitions=1/24 files=1 size=20.36KB
stats-rows=310 extrapolated-rows=disabled
table stats: rows=7300 size=478.45KB
column stats: all
mem-estimate=16.00MB mem-reservation=0B
tuple-ids=0 row-size=89B cardinality=310
====
# Dynamically partitioned HDFS insert
create table dummy_insert
partitioned by (l_partkey) as
select l_comment, l_partkey from tpch.lineitem
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=376.99MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=376.99MB mem-reservation=0B
WRITE TO HDFS [default.dummy_insert, OVERWRITE=false, PARTITION-KEYS=(l_partkey)]
| partitions=200516
| mem-estimate=288.99MB mem-reservation=0B
|
00:SCAN HDFS [tpch.lineitem]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=50B cardinality=6001215
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=184.33MB
F01:PLAN FRAGMENT [HASH(l_partkey)] hosts=3 instances=3
| Per-Host Resources: mem-estimate=96.33MB mem-reservation=0B
WRITE TO HDFS [default.dummy_insert, OVERWRITE=false, PARTITION-KEYS=(l_partkey)]
| partitions=200516
| mem-estimate=96.33MB mem-reservation=0B
|
01:EXCHANGE [HASH(l_partkey)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=50B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=88.00MB mem-reservation=0B
00:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=50B cardinality=6001215
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=272.33MB
F01:PLAN FRAGMENT [HASH(l_partkey)] hosts=3 instances=6
| Per-Host Resources: mem-estimate=96.33MB mem-reservation=0B
WRITE TO HDFS [default.dummy_insert, OVERWRITE=false, PARTITION-KEYS=(l_partkey)]
| partitions=200516
| mem-estimate=48.16MB mem-reservation=0B
|
01:EXCHANGE [HASH(l_partkey)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0 row-size=50B cardinality=6001215
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=176.00MB mem-reservation=0B
00:SCAN HDFS [tpch.lineitem, RANDOM]
partitions=1/1 files=1 size=718.94MB
stats-rows=6001215 extrapolated-rows=disabled
table stats: rows=6001215 size=718.94MB
column stats: all
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=50B cardinality=6001215
====
# Variety of operators in and outside of subplan. All operators in subplan consume
# resources while the subplan is open.
select distinct c_name, v.o_orderkey, v.o_orderstatus
from tpch_nested_parquet.customer c,
(select distinct o1.o_orderkey, o2.o_orderstatus
from c.c_orders o1
join c.c_orders o2 on o1.o_orderkey = o2.o_orderkey
order by o1.o_orderkey limit 100) v
---- PLAN
Max Per-Host Resource Reservation: Memory=69.94MB
Per-Host Resource Estimates: Memory=345.94MB
WARNING: The following tables are missing relevant table and/or column statistics.
tpch_nested_parquet.customer
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=345.94MB mem-reservation=69.94MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
09:AGGREGATE [FINALIZE]
| group by: c_name, o1.o_orderkey, o2.o_orderstatus
| mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=58B cardinality=1500000
|
01:SUBPLAN
| mem-estimate=0B mem-reservation=0B
| tuple-ids=4,0 row-size=90B cardinality=1500000
|
|--08:NESTED LOOP JOIN [CROSS JOIN]
| | mem-estimate=66B mem-reservation=0B
| | tuple-ids=4,0 row-size=90B cardinality=10
| |
| |--02:SINGULAR ROW SRC
| | parent-subplan=01
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=0 row-size=66B cardinality=1
| |
| 07:TOP-N [LIMIT=100]
| | order by: o1.o_orderkey ASC
| | mem-estimate=240B mem-reservation=0B
| | tuple-ids=4 row-size=24B cardinality=10
| |
| 06:AGGREGATE [FINALIZE]
| | group by: o1.o_orderkey, o2.o_orderstatus
| | mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| | tuple-ids=3 row-size=24B cardinality=10
| |
| 05:HASH JOIN [INNER JOIN]
| | hash predicates: o1.o_orderkey = o2.o_orderkey
| | fk/pk conjuncts: assumed fk/pk
| | mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB
| | tuple-ids=1,2 row-size=32B cardinality=10
| |
| |--04:UNNEST [c.c_orders o2]
| | parent-subplan=01
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=2 row-size=0B cardinality=10
| |
| 03:UNNEST [c.c_orders o1]
| parent-subplan=01
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=0B cardinality=10
|
00:SCAN HDFS [tpch_nested_parquet.customer c]
partitions=1/1 files=4 size=292.35MB
stats-rows=150000 extrapolated-rows=disabled
table stats: rows=150000 size=292.35MB
columns missing stats: c_orders, c_orders
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=66B cardinality=150000
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=103.94MB
Per-Host Resource Estimates: Memory=473.94MB
WARNING: The following tables are missing relevant table and/or column statistics.
tpch_nested_parquet.customer
F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
12:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=6 row-size=58B cardinality=1500000
|
F01:PLAN FRAGMENT [HASH(c_name,v.o_orderkey,v.o_orderstatus)] hosts=3 instances=3
Per-Host Resources: mem-estimate=128.00MB mem-reservation=34.00MB
11:AGGREGATE [FINALIZE]
| group by: c_name, v.o_orderkey, v.o_orderstatus
| mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=58B cardinality=1500000
|
10:EXCHANGE [HASH(c_name,v.o_orderkey,v.o_orderstatus)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=6 row-size=58B cardinality=1500000
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=345.94MB mem-reservation=69.94MB
09:AGGREGATE [STREAMING]
| group by: c_name, o1.o_orderkey, o2.o_orderstatus
| mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=58B cardinality=1500000
|
01:SUBPLAN
| mem-estimate=0B mem-reservation=0B
| tuple-ids=4,0 row-size=90B cardinality=1500000
|
|--08:NESTED LOOP JOIN [CROSS JOIN]
| | mem-estimate=66B mem-reservation=0B
| | tuple-ids=4,0 row-size=90B cardinality=10
| |
| |--02:SINGULAR ROW SRC
| | parent-subplan=01
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=0 row-size=66B cardinality=1
| |
| 07:TOP-N [LIMIT=100]
| | order by: o1.o_orderkey ASC
| | mem-estimate=240B mem-reservation=0B
| | tuple-ids=4 row-size=24B cardinality=10
| |
| 06:AGGREGATE [FINALIZE]
| | group by: o1.o_orderkey, o2.o_orderstatus
| | mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| | tuple-ids=3 row-size=24B cardinality=10
| |
| 05:HASH JOIN [INNER JOIN]
| | hash predicates: o1.o_orderkey = o2.o_orderkey
| | fk/pk conjuncts: assumed fk/pk
| | mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB
| | tuple-ids=1,2 row-size=32B cardinality=10
| |
| |--04:UNNEST [c.c_orders o2]
| | parent-subplan=01
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=2 row-size=0B cardinality=10
| |
| 03:UNNEST [c.c_orders o1]
| parent-subplan=01
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=0B cardinality=10
|
00:SCAN HDFS [tpch_nested_parquet.customer c, RANDOM]
partitions=1/1 files=4 size=292.35MB
stats-rows=150000 extrapolated-rows=disabled
table stats: rows=150000 size=292.35MB
columns missing stats: c_orders, c_orders
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=66B cardinality=150000
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=207.88MB
Per-Host Resource Estimates: Memory=947.88MB
WARNING: The following tables are missing relevant table and/or column statistics.
tpch_nested_parquet.customer
F02:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
12:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=6 row-size=58B cardinality=1500000
|
F01:PLAN FRAGMENT [HASH(c_name,v.o_orderkey,v.o_orderstatus)] hosts=3 instances=6
Per-Host Resources: mem-estimate=256.00MB mem-reservation=68.00MB
11:AGGREGATE [FINALIZE]
| group by: c_name, v.o_orderkey, v.o_orderstatus
| mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=58B cardinality=1500000
|
10:EXCHANGE [HASH(c_name,v.o_orderkey,v.o_orderstatus)]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=6 row-size=58B cardinality=1500000
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=691.88MB mem-reservation=139.88MB
09:AGGREGATE [STREAMING]
| group by: c_name, o1.o_orderkey, o2.o_orderstatus
| mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=6 row-size=58B cardinality=1500000
|
01:SUBPLAN
| mem-estimate=0B mem-reservation=0B
| tuple-ids=4,0 row-size=90B cardinality=1500000
|
|--08:NESTED LOOP JOIN [CROSS JOIN]
| | mem-estimate=66B mem-reservation=0B
| | tuple-ids=4,0 row-size=90B cardinality=10
| |
| |--02:SINGULAR ROW SRC
| | parent-subplan=01
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=0 row-size=66B cardinality=1
| |
| 07:TOP-N [LIMIT=100]
| | order by: o1.o_orderkey ASC
| | mem-estimate=240B mem-reservation=0B
| | tuple-ids=4 row-size=24B cardinality=10
| |
| 06:AGGREGATE [FINALIZE]
| | group by: o1.o_orderkey, o2.o_orderstatus
| | mem-estimate=128.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| | tuple-ids=3 row-size=24B cardinality=10
| |
| 05:HASH JOIN [INNER JOIN]
| | hash predicates: o1.o_orderkey = o2.o_orderkey
| | fk/pk conjuncts: assumed fk/pk
| | mem-estimate=1.94MB mem-reservation=1.94MB spill-buffer=64.00KB
| | tuple-ids=1,2 row-size=32B cardinality=10
| |
| |--04:UNNEST [c.c_orders o2]
| | parent-subplan=01
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=2 row-size=0B cardinality=10
| |
| 03:UNNEST [c.c_orders o1]
| parent-subplan=01
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=0B cardinality=10
|
00:SCAN HDFS [tpch_nested_parquet.customer c, RANDOM]
partitions=1/1 files=4 size=292.35MB
stats-rows=150000 extrapolated-rows=disabled
table stats: rows=150000 size=292.35MB
columns missing stats: c_orders, c_orders
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=66B cardinality=150000
====
# Pipeline of blocking operators in a subplan. All operators consume resources at the
# same time (unlike blocking operators outside of a subplan).
select *
from tpch_nested_parquet.customer c,
(select *, row_number() over (order by o_totalprice) rnum_price,
row_number() over (order by o_orderdate) rnum_date,
row_number() over (order by o_orderpriority) rnum_priority
from c.c_orders) v;
---- PLAN
Max Per-Host Resource Reservation: Memory=48.00MB
Per-Host Resource Estimates: Memory=136.00MB
WARNING: The following tables are missing relevant table and/or column statistics.
tpch_nested_parquet.customer
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=136.00MB mem-reservation=48.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
01:SUBPLAN
| mem-estimate=0B mem-reservation=0B
| tuple-ids=12,7,0 row-size=418B cardinality=1500000
|
|--10:NESTED LOOP JOIN [CROSS JOIN]
| | mem-estimate=254B mem-reservation=0B
| | tuple-ids=12,7,0 row-size=418B cardinality=10
| |
| |--02:SINGULAR ROW SRC
| | parent-subplan=01
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=0 row-size=254B cardinality=1
| |
| 09:ANALYTIC
| | functions: row_number()
| | order by: o_orderpriority ASC
| | window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| | mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| | tuple-ids=12,7 row-size=164B cardinality=10
| |
| 08:SORT
| | order by: o_orderpriority ASC
| | mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| | tuple-ids=12 row-size=156B cardinality=10
| |
| 07:ANALYTIC
| | functions: row_number()
| | order by: o_orderdate ASC
| | window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| | mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| | tuple-ids=10,6 row-size=156B cardinality=10
| |
| 06:SORT
| | order by: o_orderdate ASC
| | mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| | tuple-ids=10 row-size=148B cardinality=10
| |
| 05:ANALYTIC
| | functions: row_number()
| | order by: o_totalprice ASC
| | window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| | mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| | tuple-ids=8,5 row-size=148B cardinality=10
| |
| 04:SORT
| | order by: o_totalprice ASC
| | mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| | tuple-ids=8 row-size=140B cardinality=10
| |
| 03:UNNEST [c.c_orders]
| parent-subplan=01
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=0B cardinality=10
|
00:SCAN HDFS [tpch_nested_parquet.customer c]
partitions=1/1 files=4 size=292.35MB
stats-rows=150000 extrapolated-rows=disabled
table stats: rows=150000 size=292.35MB
columns missing stats: c_orders
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=254B cardinality=150000
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=48.00MB
Per-Host Resource Estimates: Memory=136.00MB
WARNING: The following tables are missing relevant table and/or column statistics.
tpch_nested_parquet.customer
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
11:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=12,7,0 row-size=418B cardinality=1500000
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=3
Per-Host Resources: mem-estimate=136.00MB mem-reservation=48.00MB
01:SUBPLAN
| mem-estimate=0B mem-reservation=0B
| tuple-ids=12,7,0 row-size=418B cardinality=1500000
|
|--10:NESTED LOOP JOIN [CROSS JOIN]
| | mem-estimate=254B mem-reservation=0B
| | tuple-ids=12,7,0 row-size=418B cardinality=10
| |
| |--02:SINGULAR ROW SRC
| | parent-subplan=01
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=0 row-size=254B cardinality=1
| |
| 09:ANALYTIC
| | functions: row_number()
| | order by: o_orderpriority ASC
| | window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| | mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| | tuple-ids=12,7 row-size=164B cardinality=10
| |
| 08:SORT
| | order by: o_orderpriority ASC
| | mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| | tuple-ids=12 row-size=156B cardinality=10
| |
| 07:ANALYTIC
| | functions: row_number()
| | order by: o_orderdate ASC
| | window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| | mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| | tuple-ids=10,6 row-size=156B cardinality=10
| |
| 06:SORT
| | order by: o_orderdate ASC
| | mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| | tuple-ids=10 row-size=148B cardinality=10
| |
| 05:ANALYTIC
| | functions: row_number()
| | order by: o_totalprice ASC
| | window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| | mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| | tuple-ids=8,5 row-size=148B cardinality=10
| |
| 04:SORT
| | order by: o_totalprice ASC
| | mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| | tuple-ids=8 row-size=140B cardinality=10
| |
| 03:UNNEST [c.c_orders]
| parent-subplan=01
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=0B cardinality=10
|
00:SCAN HDFS [tpch_nested_parquet.customer c, RANDOM]
partitions=1/1 files=4 size=292.35MB
stats-rows=150000 extrapolated-rows=disabled
table stats: rows=150000 size=292.35MB
columns missing stats: c_orders
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=254B cardinality=150000
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=96.00MB
Per-Host Resource Estimates: Memory=272.00MB
WARNING: The following tables are missing relevant table and/or column statistics.
tpch_nested_parquet.customer
F01:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
11:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=12,7,0 row-size=418B cardinality=1500000
|
F00:PLAN FRAGMENT [RANDOM] hosts=3 instances=6
Per-Host Resources: mem-estimate=272.00MB mem-reservation=96.00MB
01:SUBPLAN
| mem-estimate=0B mem-reservation=0B
| tuple-ids=12,7,0 row-size=418B cardinality=1500000
|
|--10:NESTED LOOP JOIN [CROSS JOIN]
| | mem-estimate=254B mem-reservation=0B
| | tuple-ids=12,7,0 row-size=418B cardinality=10
| |
| |--02:SINGULAR ROW SRC
| | parent-subplan=01
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=0 row-size=254B cardinality=1
| |
| 09:ANALYTIC
| | functions: row_number()
| | order by: o_orderpriority ASC
| | window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| | mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| | tuple-ids=12,7 row-size=164B cardinality=10
| |
| 08:SORT
| | order by: o_orderpriority ASC
| | mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| | tuple-ids=12 row-size=156B cardinality=10
| |
| 07:ANALYTIC
| | functions: row_number()
| | order by: o_orderdate ASC
| | window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| | mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| | tuple-ids=10,6 row-size=156B cardinality=10
| |
| 06:SORT
| | order by: o_orderdate ASC
| | mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| | tuple-ids=10 row-size=148B cardinality=10
| |
| 05:ANALYTIC
| | functions: row_number()
| | order by: o_totalprice ASC
| | window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| | mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| | tuple-ids=8,5 row-size=148B cardinality=10
| |
| 04:SORT
| | order by: o_totalprice ASC
| | mem-estimate=12.00MB mem-reservation=12.00MB spill-buffer=2.00MB
| | tuple-ids=8 row-size=140B cardinality=10
| |
| 03:UNNEST [c.c_orders]
| parent-subplan=01
| mem-estimate=0B mem-reservation=0B
| tuple-ids=1 row-size=0B cardinality=10
|
00:SCAN HDFS [tpch_nested_parquet.customer c, RANDOM]
partitions=1/1 files=4 size=292.35MB
stats-rows=150000 extrapolated-rows=disabled
table stats: rows=150000 size=292.35MB
columns missing stats: c_orders
mem-estimate=88.00MB mem-reservation=0B
tuple-ids=0 row-size=254B cardinality=150000
====
# Bushy hash join plan. Only two of the hash joins can execute concurrently, so we only
# need enough reservation for 2 hash joins.
select straight_join *
from tpch_parquet.orders t1
join (
select straight_join t2.o_orderkey k2, k3, k4
from tpch_parquet.orders t2
join (
select straight_join t3.o_orderkey k3, t4.o_orderkey k4
from tpch_parquet.orders t3
join tpch_parquet.orders t4 on t3.o_orderkey = t4.o_orderkey
) v2 on v2.k3 = t2.o_orderkey
) v1 on v1.k3 = t1.o_orderkey
---- PLAN
Max Per-Host Resource Reservation: Memory=68.00MB
Per-Host Resource Estimates: Memory=177.00MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=177.00MB mem-reservation=68.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
06:HASH JOIN [INNER JOIN]
| hash predicates: t1.o_orderkey = t3.o_orderkey
| fk/pk conjuncts: t1.o_orderkey = t3.o_orderkey
| runtime filters: RF000 <- t3.o_orderkey
| mem-estimate=37.77MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=0,1,2,3 row-size=215B cardinality=1500000
|
|--05:HASH JOIN [INNER JOIN]
| | hash predicates: t2.o_orderkey = t3.o_orderkey
| | fk/pk conjuncts: t2.o_orderkey = t3.o_orderkey
| | runtime filters: RF001 <- t3.o_orderkey
| | mem-estimate=34.00MB mem-reservation=34.00MB spill-buffer=2.00MB
| | tuple-ids=1,2,3 row-size=24B cardinality=1500000
| |
| |--04:HASH JOIN [INNER JOIN]
| | | hash predicates: t3.o_orderkey = t4.o_orderkey
| | | fk/pk conjuncts: t3.o_orderkey = t4.o_orderkey
| | | runtime filters: RF002 <- t4.o_orderkey
| | | mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB
| | | tuple-ids=2,3 row-size=16B cardinality=1500000
| | |
| | |--03:SCAN HDFS [tpch_parquet.orders t4]
| | | partitions=1/1 files=2 size=54.20MB
| | | stats-rows=1500000 extrapolated-rows=disabled
| | | table stats: rows=1500000 size=54.20MB
| | | column stats: all
| | | mem-estimate=40.00MB mem-reservation=0B
| | | tuple-ids=3 row-size=8B cardinality=1500000
| | |
| | 02:SCAN HDFS [tpch_parquet.orders t3]
| | partitions=1/1 files=2 size=54.20MB
| | runtime filters: RF002 -> t3.o_orderkey
| | stats-rows=1500000 extrapolated-rows=disabled
| | table stats: rows=1500000 size=54.20MB
| | column stats: all
| | mem-estimate=40.00MB mem-reservation=0B
| | tuple-ids=2 row-size=8B cardinality=1500000
| |
| 01:SCAN HDFS [tpch_parquet.orders t2]
| partitions=1/1 files=2 size=54.20MB
| runtime filters: RF001 -> t2.o_orderkey
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=54.20MB
| column stats: all
| mem-estimate=40.00MB mem-reservation=0B
| tuple-ids=1 row-size=8B cardinality=1500000
|
00:SCAN HDFS [tpch_parquet.orders t1]
partitions=1/1 files=2 size=54.20MB
runtime filters: RF000 -> t1.o_orderkey
stats-rows=1500000 extrapolated-rows=disabled
table stats: rows=1500000 size=54.20MB
column stats: all
mem-estimate=40.00MB mem-reservation=0B
tuple-ids=0 row-size=191B cardinality=1500000
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=59.50MB
Per-Host Resource Estimates: Memory=223.27MB
F05:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
11:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0,1,2,3 row-size=215B cardinality=1500000
|
F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
Per-Host Resources: mem-estimate=77.77MB mem-reservation=34.00MB
06:HASH JOIN [INNER JOIN, BROADCAST]
| hash predicates: t1.o_orderkey = t3.o_orderkey
| fk/pk conjuncts: t1.o_orderkey = t3.o_orderkey
| runtime filters: RF000 <- t3.o_orderkey
| mem-estimate=37.77MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=0,1,2,3 row-size=215B cardinality=1500000
|
|--10:EXCHANGE [BROADCAST]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1,2,3 row-size=24B cardinality=1500000
| |
| F04:PLAN FRAGMENT [HASH(t3.o_orderkey)] hosts=2 instances=2
| Per-Host Resources: mem-estimate=25.50MB mem-reservation=25.50MB
| 05:HASH JOIN [INNER JOIN, PARTITIONED]
| | hash predicates: t2.o_orderkey = t3.o_orderkey
| | fk/pk conjuncts: t2.o_orderkey = t3.o_orderkey
| | runtime filters: RF001 <- t3.o_orderkey
| | mem-estimate=17.00MB mem-reservation=17.00MB spill-buffer=1.00MB
| | tuple-ids=1,2,3 row-size=24B cardinality=1500000
| |
| |--04:HASH JOIN [INNER JOIN, PARTITIONED]
| | | hash predicates: t3.o_orderkey = t4.o_orderkey
| | | fk/pk conjuncts: t3.o_orderkey = t4.o_orderkey
| | | runtime filters: RF002 <- t4.o_orderkey
| | | mem-estimate=8.50MB mem-reservation=8.50MB spill-buffer=512.00KB
| | | tuple-ids=2,3 row-size=16B cardinality=1500000
| | |
| | |--08:EXCHANGE [HASH(t4.o_orderkey)]
| | | | mem-estimate=0B mem-reservation=0B
| | | | tuple-ids=3 row-size=8B cardinality=1500000
| | | |
| | | F03:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
| | | Per-Host Resources: mem-estimate=40.00MB mem-reservation=0B
| | | 03:SCAN HDFS [tpch_parquet.orders t4, RANDOM]
| | | partitions=1/1 files=2 size=54.20MB
| | | stats-rows=1500000 extrapolated-rows=disabled
| | | table stats: rows=1500000 size=54.20MB
| | | column stats: all
| | | mem-estimate=40.00MB mem-reservation=0B
| | | tuple-ids=3 row-size=8B cardinality=1500000
| | |
| | 07:EXCHANGE [HASH(t3.o_orderkey)]
| | | mem-estimate=0B mem-reservation=0B
| | | tuple-ids=2 row-size=8B cardinality=1500000
| | |
| | F02:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
| | Per-Host Resources: mem-estimate=40.00MB mem-reservation=0B
| | 02:SCAN HDFS [tpch_parquet.orders t3, RANDOM]
| | partitions=1/1 files=2 size=54.20MB
| | runtime filters: RF002 -> t3.o_orderkey
| | stats-rows=1500000 extrapolated-rows=disabled
| | table stats: rows=1500000 size=54.20MB
| | column stats: all
| | mem-estimate=40.00MB mem-reservation=0B
| | tuple-ids=2 row-size=8B cardinality=1500000
| |
| 09:EXCHANGE [HASH(t2.o_orderkey)]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=8B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=2
| Per-Host Resources: mem-estimate=40.00MB mem-reservation=0B
| 01:SCAN HDFS [tpch_parquet.orders t2, RANDOM]
| partitions=1/1 files=2 size=54.20MB
| runtime filters: RF001 -> t2.o_orderkey
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=54.20MB
| column stats: all
| mem-estimate=40.00MB mem-reservation=0B
| tuple-ids=1 row-size=8B cardinality=1500000
|
00:SCAN HDFS [tpch_parquet.orders t1, RANDOM]
partitions=1/1 files=2 size=54.20MB
runtime filters: RF000 -> t1.o_orderkey
stats-rows=1500000 extrapolated-rows=disabled
table stats: rows=1500000 size=54.20MB
column stats: all
mem-estimate=40.00MB mem-reservation=0B
tuple-ids=0 row-size=191B cardinality=1500000
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=94.50MB
Per-Host Resource Estimates: Memory=422.03MB
F05:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
11:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0,1,2,3 row-size=215B cardinality=1500000
|
F00:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
Per-Host Resources: mem-estimate=155.53MB mem-reservation=68.00MB
06:HASH JOIN [INNER JOIN, BROADCAST]
| hash-table-id=00
| hash predicates: t1.o_orderkey = t3.o_orderkey
| fk/pk conjuncts: t1.o_orderkey = t3.o_orderkey
| runtime filters: RF000 <- t3.o_orderkey
| mem-estimate=37.77MB mem-reservation=34.00MB spill-buffer=2.00MB
| tuple-ids=0,1,2,3 row-size=215B cardinality=1500000
|
|--F06:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| | Per-Host Resources: included in parent fragment
| JOIN BUILD
| | join-table-id=00 plan-id=01 cohort-id=01
| | build expressions: t3.o_orderkey
| | mem-estimate=0B mem-reservation=0B
| |
| 10:EXCHANGE [BROADCAST]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1,2,3 row-size=24B cardinality=1500000
| |
| F04:PLAN FRAGMENT [HASH(t3.o_orderkey)] hosts=2 instances=4
| Per-Host Resources: mem-estimate=26.50MB mem-reservation=26.50MB
| 05:HASH JOIN [INNER JOIN, PARTITIONED]
| | hash-table-id=01
| | hash predicates: t2.o_orderkey = t3.o_orderkey
| | fk/pk conjuncts: t2.o_orderkey = t3.o_orderkey
| | runtime filters: RF001 <- t3.o_orderkey
| | mem-estimate=8.50MB mem-reservation=8.50MB spill-buffer=512.00KB
| | tuple-ids=1,2,3 row-size=24B cardinality=1500000
| |
| |--F07:PLAN FRAGMENT [HASH(t3.o_orderkey)] hosts=2 instances=4
| | | Per-Host Resources: included in parent fragment
| | JOIN BUILD
| | | join-table-id=01 plan-id=02 cohort-id=02
| | | build expressions: t3.o_orderkey
| | | mem-estimate=0B mem-reservation=0B
| | |
| | 04:HASH JOIN [INNER JOIN, PARTITIONED]
| | | hash-table-id=02
| | | hash predicates: t3.o_orderkey = t4.o_orderkey
| | | fk/pk conjuncts: t3.o_orderkey = t4.o_orderkey
| | | runtime filters: RF002 <- t4.o_orderkey
| | | mem-estimate=4.75MB mem-reservation=4.75MB spill-buffer=256.00KB
| | | tuple-ids=2,3 row-size=16B cardinality=1500000
| | |
| | |--F08:PLAN FRAGMENT [HASH(t3.o_orderkey)] hosts=2 instances=4
| | | | Per-Host Resources: included in parent fragment
| | | JOIN BUILD
| | | | join-table-id=02 plan-id=03 cohort-id=03
| | | | build expressions: t4.o_orderkey
| | | | mem-estimate=0B mem-reservation=0B
| | | |
| | | 08:EXCHANGE [HASH(t4.o_orderkey)]
| | | | mem-estimate=0B mem-reservation=0B
| | | | tuple-ids=3 row-size=8B cardinality=1500000
| | | |
| | | F03:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| | | Per-Host Resources: mem-estimate=80.00MB mem-reservation=0B
| | | 03:SCAN HDFS [tpch_parquet.orders t4, RANDOM]
| | | partitions=1/1 files=2 size=54.20MB
| | | stats-rows=1500000 extrapolated-rows=disabled
| | | table stats: rows=1500000 size=54.20MB
| | | column stats: all
| | | mem-estimate=40.00MB mem-reservation=0B
| | | tuple-ids=3 row-size=8B cardinality=1500000
| | |
| | 07:EXCHANGE [HASH(t3.o_orderkey)]
| | | mem-estimate=0B mem-reservation=0B
| | | tuple-ids=2 row-size=8B cardinality=1500000
| | |
| | F02:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| | Per-Host Resources: mem-estimate=80.00MB mem-reservation=0B
| | 02:SCAN HDFS [tpch_parquet.orders t3, RANDOM]
| | partitions=1/1 files=2 size=54.20MB
| | runtime filters: RF002 -> t3.o_orderkey
| | stats-rows=1500000 extrapolated-rows=disabled
| | table stats: rows=1500000 size=54.20MB
| | column stats: all
| | mem-estimate=40.00MB mem-reservation=0B
| | tuple-ids=2 row-size=8B cardinality=1500000
| |
| 09:EXCHANGE [HASH(t2.o_orderkey)]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1 row-size=8B cardinality=1500000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=2 instances=4
| Per-Host Resources: mem-estimate=80.00MB mem-reservation=0B
| 01:SCAN HDFS [tpch_parquet.orders t2, RANDOM]
| partitions=1/1 files=2 size=54.20MB
| runtime filters: RF001 -> t2.o_orderkey
| stats-rows=1500000 extrapolated-rows=disabled
| table stats: rows=1500000 size=54.20MB
| column stats: all
| mem-estimate=40.00MB mem-reservation=0B
| tuple-ids=1 row-size=8B cardinality=1500000
|
00:SCAN HDFS [tpch_parquet.orders t1, RANDOM]
partitions=1/1 files=2 size=54.20MB
runtime filters: RF000 -> t1.o_orderkey
stats-rows=1500000 extrapolated-rows=disabled
table stats: rows=1500000 size=54.20MB
column stats: all
mem-estimate=40.00MB mem-reservation=0B
tuple-ids=0 row-size=191B cardinality=1500000
====
# Bushy nested loop join plan. Because of IMPALA-4179 the nested loop join cannot close
# its build-side child immediately after the build phase. Therefore the whole tree of
# joins remains open until the query finishes.
# TODO: IMPALA-4179: the estimates should get lower.
select straight_join *
from tpch_parquet.nation t1
join (
select straight_join t2.n_nationkey k2, k3, k4
from tpch_parquet.nation t2
join (
select straight_join t3.n_nationkey k3, t4.s_suppkey k4
from tpch_parquet.nation t3
join tpch_parquet.supplier t4
) v2
) v1
---- PLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=137.99MB
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=137.99MB mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
06:NESTED LOOP JOIN [CROSS JOIN]
| mem-estimate=71.53MB mem-reservation=0B
| tuple-ids=0,1,2,3 row-size=129B cardinality=156250000
|
|--05:NESTED LOOP JOIN [CROSS JOIN]
| | mem-estimate=2.38MB mem-reservation=0B
| | tuple-ids=1,2,3 row-size=12B cardinality=6250000
| |
| |--04:NESTED LOOP JOIN [CROSS JOIN]
| | | mem-estimate=78.12KB mem-reservation=0B
| | | tuple-ids=2,3 row-size=10B cardinality=250000
| | |
| | |--03:SCAN HDFS [tpch_parquet.supplier t4]
| | | partitions=1/1 files=1 size=882.76KB
| | | stats-rows=10000 extrapolated-rows=disabled
| | | table stats: rows=10000 size=882.76KB
| | | column stats: all
| | | mem-estimate=16.00MB mem-reservation=0B
| | | tuple-ids=3 row-size=8B cardinality=10000
| | |
| | 02:SCAN HDFS [tpch_parquet.nation t3]
| | partitions=1/1 files=1 size=2.94KB
| | stats-rows=25 extrapolated-rows=disabled
| | table stats: rows=25 size=2.94KB
| | column stats: all
| | mem-estimate=16.00MB mem-reservation=0B
| | tuple-ids=2 row-size=2B cardinality=25
| |
| 01:SCAN HDFS [tpch_parquet.nation t2]
| partitions=1/1 files=1 size=2.94KB
| stats-rows=25 extrapolated-rows=disabled
| table stats: rows=25 size=2.94KB
| column stats: all
| mem-estimate=16.00MB mem-reservation=0B
| tuple-ids=1 row-size=2B cardinality=25
|
00:SCAN HDFS [tpch_parquet.nation t1]
partitions=1/1 files=1 size=2.94KB
stats-rows=25 extrapolated-rows=disabled
table stats: rows=25 size=2.94KB
column stats: all
mem-estimate=16.00MB mem-reservation=0B
tuple-ids=0 row-size=117B cardinality=25
---- DISTRIBUTEDPLAN
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=137.99MB
F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
10:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0,1,2,3 row-size=129B cardinality=156250000
|
F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
Per-Host Resources: mem-estimate=87.53MB mem-reservation=0B
06:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
| mem-estimate=71.53MB mem-reservation=0B
| tuple-ids=0,1,2,3 row-size=129B cardinality=156250000
|
|--09:EXCHANGE [BROADCAST]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1,2,3 row-size=12B cardinality=6250000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
| Per-Host Resources: mem-estimate=18.38MB mem-reservation=0B
| 05:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
| | mem-estimate=2.38MB mem-reservation=0B
| | tuple-ids=1,2,3 row-size=12B cardinality=6250000
| |
| |--08:EXCHANGE [BROADCAST]
| | | mem-estimate=0B mem-reservation=0B
| | | tuple-ids=2,3 row-size=10B cardinality=250000
| | |
| | F02:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
| | Per-Host Resources: mem-estimate=16.08MB mem-reservation=0B
| | 04:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
| | | mem-estimate=78.12KB mem-reservation=0B
| | | tuple-ids=2,3 row-size=10B cardinality=250000
| | |
| | |--07:EXCHANGE [BROADCAST]
| | | | mem-estimate=0B mem-reservation=0B
| | | | tuple-ids=3 row-size=8B cardinality=10000
| | | |
| | | F03:PLAN FRAGMENT [RANDOM] hosts=1 instances=1
| | | Per-Host Resources: mem-estimate=16.00MB mem-reservation=0B
| | | 03:SCAN HDFS [tpch_parquet.supplier t4, RANDOM]
| | | partitions=1/1 files=1 size=882.76KB
| | | stats-rows=10000 extrapolated-rows=disabled
| | | table stats: rows=10000 size=882.76KB
| | | column stats: all
| | | mem-estimate=16.00MB mem-reservation=0B
| | | tuple-ids=3 row-size=8B cardinality=10000
| | |
| | 02:SCAN HDFS [tpch_parquet.nation t3, RANDOM]
| | partitions=1/1 files=1 size=2.94KB
| | stats-rows=25 extrapolated-rows=disabled
| | table stats: rows=25 size=2.94KB
| | column stats: all
| | mem-estimate=16.00MB mem-reservation=0B
| | tuple-ids=2 row-size=2B cardinality=25
| |
| 01:SCAN HDFS [tpch_parquet.nation t2, RANDOM]
| partitions=1/1 files=1 size=2.94KB
| stats-rows=25 extrapolated-rows=disabled
| table stats: rows=25 size=2.94KB
| column stats: all
| mem-estimate=16.00MB mem-reservation=0B
| tuple-ids=1 row-size=2B cardinality=25
|
00:SCAN HDFS [tpch_parquet.nation t1, RANDOM]
partitions=1/1 files=1 size=2.94KB
stats-rows=25 extrapolated-rows=disabled
table stats: rows=25 size=2.94KB
column stats: all
mem-estimate=16.00MB mem-reservation=0B
tuple-ids=0 row-size=117B cardinality=25
---- PARALLELPLANS
Max Per-Host Resource Reservation: Memory=0B
Per-Host Resource Estimates: Memory=275.97MB
F04:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=0B mem-reservation=0B
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
10:EXCHANGE [UNPARTITIONED]
| mem-estimate=0B mem-reservation=0B
| tuple-ids=0,1,2,3 row-size=129B cardinality=156250000
|
F00:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
Per-Host Resources: mem-estimate=175.05MB mem-reservation=0B
06:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
| join table id: 00
| mem-estimate=71.53MB mem-reservation=0B
| tuple-ids=0,1,2,3 row-size=129B cardinality=156250000
|
|--F05:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
| | Per-Host Resources: included in parent fragment
| JOIN BUILD
| | join-table-id=00 plan-id=01 cohort-id=01
| | mem-estimate=0B mem-reservation=0B
| |
| 09:EXCHANGE [BROADCAST]
| | mem-estimate=0B mem-reservation=0B
| | tuple-ids=1,2,3 row-size=12B cardinality=6250000
| |
| F01:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
| Per-Host Resources: mem-estimate=36.77MB mem-reservation=0B
| 05:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
| | join table id: 01
| | mem-estimate=2.38MB mem-reservation=0B
| | tuple-ids=1,2,3 row-size=12B cardinality=6250000
| |
| |--F06:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
| | | Per-Host Resources: included in parent fragment
| | JOIN BUILD
| | | join-table-id=01 plan-id=02 cohort-id=02
| | | mem-estimate=0B mem-reservation=0B
| | |
| | 08:EXCHANGE [BROADCAST]
| | | mem-estimate=0B mem-reservation=0B
| | | tuple-ids=2,3 row-size=10B cardinality=250000
| | |
| | F02:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
| | Per-Host Resources: mem-estimate=32.15MB mem-reservation=0B
| | 04:NESTED LOOP JOIN [CROSS JOIN, BROADCAST]
| | | join table id: 02
| | | mem-estimate=78.12KB mem-reservation=0B
| | | tuple-ids=2,3 row-size=10B cardinality=250000
| | |
| | |--F07:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
| | | | Per-Host Resources: included in parent fragment
| | | JOIN BUILD
| | | | join-table-id=02 plan-id=03 cohort-id=03
| | | | mem-estimate=0B mem-reservation=0B
| | | |
| | | 07:EXCHANGE [BROADCAST]
| | | | mem-estimate=0B mem-reservation=0B
| | | | tuple-ids=3 row-size=8B cardinality=10000
| | | |
| | | F03:PLAN FRAGMENT [RANDOM] hosts=1 instances=2
| | | Per-Host Resources: mem-estimate=32.00MB mem-reservation=0B
| | | 03:SCAN HDFS [tpch_parquet.supplier t4, RANDOM]
| | | partitions=1/1 files=1 size=882.76KB
| | | stats-rows=10000 extrapolated-rows=disabled
| | | table stats: rows=10000 size=882.76KB
| | | column stats: all
| | | mem-estimate=16.00MB mem-reservation=0B
| | | tuple-ids=3 row-size=8B cardinality=10000
| | |
| | 02:SCAN HDFS [tpch_parquet.nation t3, RANDOM]
| | partitions=1/1 files=1 size=2.94KB
| | stats-rows=25 extrapolated-rows=disabled
| | table stats: rows=25 size=2.94KB
| | column stats: all
| | mem-estimate=16.00MB mem-reservation=0B
| | tuple-ids=2 row-size=2B cardinality=25
| |
| 01:SCAN HDFS [tpch_parquet.nation t2, RANDOM]
| partitions=1/1 files=1 size=2.94KB
| stats-rows=25 extrapolated-rows=disabled
| table stats: rows=25 size=2.94KB
| column stats: all
| mem-estimate=16.00MB mem-reservation=0B
| tuple-ids=1 row-size=2B cardinality=25
|
00:SCAN HDFS [tpch_parquet.nation t1, RANDOM]
partitions=1/1 files=1 size=2.94KB
stats-rows=25 extrapolated-rows=disabled
table stats: rows=25 size=2.94KB
column stats: all
mem-estimate=16.00MB mem-reservation=0B
tuple-ids=0 row-size=117B cardinality=25
====
# Pipeline of analytic nodes. They should be treated as streaming nodes.
select tinyint_col, smallint_col,
sum(smallint_col) over (partition by tinyint_col order by smallint_col),
sum(smallint_col) over (partition by tinyint_col order by smallint_col
rows between unbounded preceding and 1 following),
sum(smallint_col) over (partition by tinyint_col order by smallint_col
rows between 1 following and 2 following)
from functional.alltypesagg
---- PLAN
Max Per-Host Resource Reservation: Memory=18.00MB
Per-Host Resource Estimates: Memory=34.00MB
Codegen disabled by planner
F00:PLAN FRAGMENT [UNPARTITIONED] hosts=1 instances=1
| Per-Host Resources: mem-estimate=34.00MB mem-reservation=18.00MB
PLAN-ROOT SINK
| mem-estimate=0B mem-reservation=0B
|
04:ANALYTIC
| functions: sum(smallint_col)
| partition by: tinyint_col
| order by: smallint_col ASC
| window: ROWS BETWEEN 1 FOLLOWING AND 2 FOLLOWING
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=5,2,3,4 row-size=27B cardinality=11000
|
03:ANALYTIC
| functions: sum(smallint_col)
| partition by: tinyint_col
| order by: smallint_col ASC
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=5,2,3 row-size=19B cardinality=11000
|
02:ANALYTIC
| functions: sum(smallint_col)
| partition by: tinyint_col
| order by: smallint_col ASC
| window: RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| mem-estimate=4.00MB mem-reservation=4.00MB spill-buffer=2.00MB
| tuple-ids=5,2 row-size=11B cardinality=11000
|
01:SORT
| order by: tinyint_col ASC NULLS FIRST, smallint_col ASC
| mem-estimate=6.00MB mem-reservation=6.00MB spill-buffer=2.00MB
| tuple-ids=5 row-size=3B cardinality=11000
|
00:SCAN HDFS [functional.alltypesagg]
partitions=11/11 files=11 size=814.73KB
stats-rows=11000 extrapolated-rows=disabled
table stats: rows=11000 size=814.73KB
column stats: all
mem-estimate=16.00MB mem-reservation=0B
tuple-ids=0 row-size=3B cardinality=11000
====