Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
source: crates/test-framework/src/snapshot/mod.rs
description: "Query: tpch_q13"
---
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan | Sort: custdist DESC NULLS FIRST, c_orders.c_count DESC NULLS FIRST |
| | Projection: c_orders.c_count, count(Int64(1)) AS custdist |
| | Aggregate: groupBy=[[c_orders.c_count]], aggr=[[count(Int64(1))]] |
| | SubqueryAlias: c_orders |
| | Projection: count(orders.o_orderkey) AS c_count |
| | Aggregate: groupBy=[[customer.c_custkey]], aggr=[[count(orders.o_orderkey)]] |
| | Projection: customer.c_custkey, orders.o_orderkey |
| | Left Join: customer.c_custkey = orders.o_custkey |
| | TableScan: customer projection=[c_custkey] |
| | Projection: orders.o_orderkey, orders.o_custkey |
| | Filter: orders.o_comment NOT LIKE LargeUtf8("%special%requests%") |
| | TableScan: orders projection=[o_orderkey, o_custkey, o_comment] |
| physical_plan | SortPreservingMergeExec: [custdist@1 DESC, c_count@0 DESC] |
| | SortExec: expr=[custdist@1 DESC, c_count@0 DESC], preserve_partitioning=[true] |
| | ProjectionExec: expr=[c_count@0 as c_count, count(Int64(1))@1 as custdist] |
| | AggregateExec: mode=FinalPartitioned, gby=[c_count@0 as c_count], aggr=[count(Int64(1))] |
| | RepartitionExec: partitioning=Hash([c_count@0], 32), input_partitions=32 |
| | AggregateExec: mode=Partial, gby=[c_count@0 as c_count], aggr=[count(Int64(1))] |
| | ProjectionExec: expr=[count(orders.o_orderkey)@1 as c_count] |
| | AggregateExec: mode=SinglePartitioned, gby=[c_custkey@0 as c_custkey], aggr=[count(orders.o_orderkey)] |
| | ProjectionExec: expr=[c_custkey@1 as c_custkey, o_orderkey@0 as o_orderkey] |
| | HashJoinExec: mode=Partitioned, join_type=Right, accumulator=MinMaxLeftAccumulator, on=[(o_custkey@1, c_custkey@0)], projection=[o_orderkey@0, c_custkey@2] |
| | RepartitionExec: partitioning=Hash([o_custkey@1], 32), input_partitions=32 |
| | FilterExec: o_comment@2 NOT LIKE %special%requests%, projection=[o_orderkey@0, o_custkey@1] |
| | SchemaCastScanExec |
| | BytesProcessedExec |
| | DataSourceExec: partitions=32, partition_sizes=[<redacted>] |
| | RepartitionExec: partitioning=Hash([c_custkey@0], 32), input_partitions=32 |
| | SchemaCastScanExec |
| | BytesProcessedExec |
| | DataSourceExec: partitions=32, partition_sizes=[<redacted>] |
| | |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
source: crates/test-framework/src/snapshot/mod.rs
description: "Query: tpch_q14"
---
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan | Projection: Float64(100) * CAST(sum(CASE WHEN part.p_type LIKE Utf8("PROMO%") THEN lineitem.l_extendedprice * Int64(1) - lineitem.l_discount ELSE Int64(0) END) AS Float64) / CAST(sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount) AS Float64) AS promo_revenue |
| | Aggregate: groupBy=[[]], aggr=[[sum(CASE WHEN part.p_type LIKE LargeUtf8("PROMO%") THEN __common_expr_1 ELSE Decimal128(Some(0),38,4) END) AS sum(CASE WHEN part.p_type LIKE Utf8("PROMO%") THEN lineitem.l_extendedprice * Int64(1) - lineitem.l_discount ELSE Int64(0) END), sum(__common_expr_1) AS sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)]] |
| | Projection: lineitem.l_extendedprice * (Decimal128(Some(1),20,0) - lineitem.l_discount) AS __common_expr_1, part.p_type |
| | Inner Join: lineitem.l_partkey = part.p_partkey |
| | Projection: lineitem.l_partkey, lineitem.l_extendedprice, lineitem.l_discount |
| | Filter: lineitem.l_shipdate >= Date32("1995-09-01") AND lineitem.l_shipdate < Date32("1995-10-01") |
| | TableScan: lineitem projection=[l_partkey, l_extendedprice, l_discount, l_shipdate] |
| | TableScan: part projection=[p_partkey, p_type] |
| physical_plan | ProjectionExec: expr=[100 * CAST(sum(CASE WHEN part.p_type LIKE Utf8("PROMO%") THEN lineitem.l_extendedprice * Int64(1) - lineitem.l_discount ELSE Int64(0) END)@0 AS Float64) / CAST(sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)@1 AS Float64) as promo_revenue] |
| | AggregateExec: mode=Final, gby=[], aggr=[sum(CASE WHEN part.p_type LIKE Utf8("PROMO%") THEN lineitem.l_extendedprice * Int64(1) - lineitem.l_discount ELSE Int64(0) END), sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)] |
| | CoalescePartitionsExec |
| | AggregateExec: mode=Partial, gby=[], aggr=[sum(CASE WHEN part.p_type LIKE Utf8("PROMO%") THEN lineitem.l_extendedprice * Int64(1) - lineitem.l_discount ELSE Int64(0) END), sum(lineitem.l_extendedprice * Int64(1) - lineitem.l_discount)] |
| | ProjectionExec: expr=[l_extendedprice@1 * (Some(1),20,0 - l_discount@2) as __common_expr_1, p_type@0 as p_type] |
| | HashJoinExec: mode=Partitioned, join_type=Inner, accumulator=MinMaxLeftAccumulator, on=[(p_partkey@0, l_partkey@0)], projection=[p_type@1, l_extendedprice@3, l_discount@4] |
| | RepartitionExec: partitioning=Hash([p_partkey@0], 32), input_partitions=32 |
| | SchemaCastScanExec |
| | BytesProcessedExec |
| | DataSourceExec: partitions=32, partition_sizes=[<redacted>] |
| | RepartitionExec: partitioning=Hash([l_partkey@0], 32), input_partitions=32 |
| | FilterExec: l_shipdate@3 >= 1995-09-01 AND l_shipdate@3 < 1995-10-01, projection=[l_partkey@0, l_extendedprice@1, l_discount@2] |
| | SchemaCastScanExec |
| | BytesProcessedExec |
| | DataSourceExec: partitions=32, partition_sizes=[<redacted>] |
| | |
+---------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Loading
Loading