diff --git a/src/frontend/planner_test/tests/testdata/distribution_derive.yaml b/src/frontend/planner_test/tests/testdata/distribution_derive.yaml index ed77a351ab24e..42d2fca461617 100644 --- a/src/frontend/planner_test/tests/testdata/distribution_derive.yaml +++ b/src/frontend/planner_test/tests/testdata/distribution_derive.yaml @@ -53,7 +53,7 @@ StreamExchange Hash([0]) from 2 StreamExchange NoShuffle from 3 - Table 4294967294 { columns: [v, bv, ak1.a._row_id, ak1.k1, bk1.b._row_id], primary key: [$2 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2, 3, 4] } + Table 4294967294 { columns: [v, bv, ak1.a._row_id, ak1.k1, bk1.b._row_id], primary key: [$2 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2, 3, 4], read pk prefix len hint: 3 } - id: Ak1_join_B_onk1 before: - create_tables @@ -100,7 +100,7 @@ StreamExchange Hash([0]) from 2 StreamExchange NoShuffle from 3 - Table 4294967294 { columns: [v, bv, ak1.a._row_id, ak1.k1, bk1.b._row_id], primary key: [$2 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2, 3, 4] } + Table 4294967294 { columns: [v, bv, ak1.a._row_id, ak1.k1, bk1.b._row_id], primary key: [$2 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2, 3, 4], read pk prefix len hint: 3 } - id: A_join_Bk1_onk1 before: - create_tables @@ -147,7 +147,7 @@ StreamExchange Hash([0]) from 2 StreamExchange NoShuffle from 3 - Table 4294967294 { columns: [v, bv, ak1.a._row_id, ak1.k1, bk1.b._row_id], primary key: [$2 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2, 3, 4] } + Table 4294967294 { columns: [v, bv, ak1.a._row_id, ak1.k1, bk1.b._row_id], primary key: [$2 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2, 3, 4], read pk prefix len hint: 3 } - id: Ak1_join_Bk1_onk1 before: - create_tables @@ -194,7 +194,7 @@ StreamExchange Hash([0]) from 2 StreamExchange NoShuffle from 3 - Table 4294967294 { columns: [v, bv, ak1.a._row_id, ak1.k1, bk1.b._row_id], primary key: [$2 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2, 3, 4] } + Table 4294967294 { columns: [v, bv, ak1.a._row_id, ak1.k1, bk1.b._row_id], primary key: [$2 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2, 3, 4], read pk prefix len hint: 3 } - id: aggk1_from_A before: - create_tables @@ -220,7 +220,7 @@ materialized table: 4294967294 StreamProject { exprs: [max(a.v), a.k1] } StreamHashAgg { group_key: [a.k1], aggs: [max(a.v), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -228,9 +228,9 @@ Upstream BatchPlanNode - Table 0 { columns: [a_k1, a_v, a__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0] } - Table 1 { columns: [a_k1, max(a_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [max_v, a.k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [a_k1, a_v, a__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [a_k1, max(a_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [max_v, a.k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: aggk1_from_Ak1 before: - create_tables @@ -254,14 +254,14 @@ materialized table: 4294967294 StreamProject { exprs: [max(ak1.v), ak1.k1] } StreamHashAgg { group_key: [ak1.k1], aggs: [max(ak1.v), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] Chain { table: ak1, columns: [ak1.k1, ak1.v, ak1.a._row_id], pk: [ak1.a._row_id], dist: UpstreamHashShard(ak1.k1) } Upstream BatchPlanNode - Table 0 { columns: [ak1_k1, ak1_v, ak1_a__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0] } - Table 1 { columns: [ak1_k1, max(ak1_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [max_v, ak1.k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [ak1_k1, ak1_v, ak1_a__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [ak1_k1, max(ak1_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [max_v, ak1.k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: aggk1_from_Ak1k2 before: - create_tables @@ -287,7 +287,7 @@ materialized table: 4294967294 StreamProject { exprs: [max(ak1k2.v), ak1k2.k1] } StreamHashAgg { group_key: [ak1k2.k1], aggs: [max(ak1k2.v), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -295,9 +295,9 @@ Upstream BatchPlanNode - Table 0 { columns: [ak1k2_k1, ak1k2_v, ak1k2_a__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0] } - Table 1 { columns: [ak1k2_k1, max(ak1k2_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [max_v, ak1k2.k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [ak1k2_k1, ak1k2_v, ak1k2_a__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [ak1k2_k1, max(ak1k2_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [max_v, ak1k2.k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: aggk2_from_Ak1k2 before: - create_tables @@ -323,7 +323,7 @@ materialized table: 4294967294 StreamProject { exprs: [max(ak1k2.v), ak1k2.k2] } StreamHashAgg { group_key: [ak1k2.k2], aggs: [max(ak1k2.v), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -331,9 +331,9 @@ Upstream BatchPlanNode - Table 0 { columns: [ak1k2_k2, ak1k2_v, ak1k2_a__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0] } - Table 1 { columns: [ak1k2_k2, max(ak1k2_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [max_v, ak1k2.k2], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [ak1k2_k2, ak1k2_v, ak1k2_a__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [ak1k2_k2, max(ak1k2_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [max_v, ak1k2.k2], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: aggk1k2_from_Ak1k2 before: - create_tables @@ -357,13 +357,13 @@ materialized table: 4294967294 StreamProject { exprs: [sum(ak1k2.v), ak1k2.k1, ak1k2.k2] } StreamHashAgg { group_key: [ak1k2.k1, ak1k2.k2], aggs: [sum(ak1k2.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] Chain { table: ak1k2, columns: [ak1k2.k1, ak1k2.k2, ak1k2.v, ak1k2.a._row_id], pk: [ak1k2.a._row_id], dist: UpstreamHashShard(ak1k2.k1, ak1k2.k2) } Upstream BatchPlanNode - Table 0 { columns: [ak1k2_k1, ak1k2_k2, sum(ak1k2_v), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0, 1] } - Table 4294967294 { columns: [sum_v, ak1k2.k1, ak1k2.k2], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1, 2] } + Table 0 { columns: [ak1k2_k1, ak1k2_k2, sum(ak1k2_v), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 4294967294 { columns: [sum_v, ak1k2.k1, ak1k2.k2], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1, 2], read pk prefix len hint: 2 } - id: aggk1k2_from_Ak1 before: - create_tables @@ -387,13 +387,13 @@ materialized table: 4294967294 StreamProject { exprs: [sum(ak1.v), ak1.k1, ak1.k2] } StreamHashAgg { group_key: [ak1.k1, ak1.k2], aggs: [sum(ak1.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] Chain { table: ak1, columns: [ak1.k1, ak1.k2, ak1.v, ak1.a._row_id], pk: [ak1.a._row_id], dist: UpstreamHashShard(ak1.k1) } Upstream BatchPlanNode - Table 0 { columns: [ak1_k1, ak1_k2, sum(ak1_v), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0] } - Table 4294967294 { columns: [sum_v, ak1.k1, ak1.k2], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1] } + Table 0 { columns: [ak1_k1, ak1_k2, sum(ak1_v), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0], read pk prefix len hint: 2 } + Table 4294967294 { columns: [sum_v, ak1.k1, ak1.k2], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1], read pk prefix len hint: 2 } - id: aggk1_from_aggk1 before: - create_tables @@ -427,9 +427,9 @@ materialized table: 4294967294 StreamProject { exprs: [max(count), a.k1] } StreamHashAgg { group_key: [a.k1], aggs: [max(count), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamHashAgg { group_key: [a.k1], aggs: [count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -437,10 +437,10 @@ Upstream BatchPlanNode - Table 0 { columns: [a_k1, count], primary key: [$0 ASC, $1 DESC], value indices: [0, 1], distribution key: [0] } - Table 1 { columns: [a_k1, max(count), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 2 { columns: [a_k1, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [max_num, a.k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [a_k1, count], primary key: [$0 ASC, $1 DESC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [a_k1, max(count), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [a_k1, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [max_num, a.k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: aggk1_from_aggk1k2 before: - create_tables @@ -489,12 +489,12 @@ materialized table: 4294967294 StreamProject { exprs: [max(count), a.k1] } StreamHashAgg { group_key: [a.k1], aggs: [max(count), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 StreamHashAgg { group_key: [a.k1, a.k2], aggs: [count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamExchange Hash([0, 1]) from 2 Fragment 2 @@ -502,10 +502,10 @@ Upstream BatchPlanNode - Table 0 { columns: [a_k1, count, a_k2], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 1 { columns: [a_k1, max(count), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 2 { columns: [a_k1, a_k2, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1] } - Table 4294967294 { columns: [max_num, a.k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [a_k1, count, a_k2], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [a_k1, max(count), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [a_k1, a_k2, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 4294967294 { columns: [max_num, a.k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: aggk2_from_aggk1k2 before: - create_tables @@ -554,12 +554,12 @@ materialized table: 4294967294 StreamProject { exprs: [max(count), a.k2] } StreamHashAgg { group_key: [a.k2], aggs: [max(count), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Hash([1]) from 1 Fragment 1 StreamHashAgg { group_key: [a.k1, a.k2], aggs: [count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamExchange Hash([0, 1]) from 2 Fragment 2 @@ -567,10 +567,10 @@ Upstream BatchPlanNode - Table 0 { columns: [a_k2, count, a_k1], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 1 { columns: [a_k2, max(count), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 2 { columns: [a_k1, a_k2, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1] } - Table 4294967294 { columns: [max_num, a.k2], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [a_k2, count, a_k1], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [a_k2, max(count), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [a_k1, a_k2, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 4294967294 { columns: [max_num, a.k2], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: aggk1k2_from_aggk1k2 before: - create_tables @@ -604,9 +604,9 @@ materialized table: 4294967294 StreamProject { exprs: [max(count), a.k1, a.k2] } StreamHashAgg { group_key: [a.k1, a.k2], aggs: [max(count), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamHashAgg { group_key: [a.k1, a.k2], aggs: [count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamExchange Hash([0, 1]) from 1 Fragment 1 @@ -614,10 +614,10 @@ Upstream BatchPlanNode - Table 0 { columns: [a_k1, a_k2, count], primary key: [$0 ASC, $1 ASC, $2 DESC], value indices: [0, 1, 2], distribution key: [0, 1] } - Table 1 { columns: [a_k1, a_k2, max(count), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0, 1] } - Table 2 { columns: [a_k1, a_k2, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1] } - Table 4294967294 { columns: [max_num, a.k1, a.k2], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1, 2] } + Table 0 { columns: [a_k1, a_k2, count], primary key: [$0 ASC, $1 ASC, $2 DESC], value indices: [0, 1, 2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 1 { columns: [a_k1, a_k2, max(count), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 2 { columns: [a_k1, a_k2, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 4294967294 { columns: [max_num, a.k1, a.k2], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1, 2], read pk prefix len hint: 2 } - id: Ak1_join_aggk1_onk1 before: - create_tables @@ -656,7 +656,7 @@ StreamExchange Hash([0]) from 1 StreamProject { exprs: [count, a.k1] } StreamHashAgg { group_key: [a.k1], aggs: [count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 2 Fragment 1 @@ -669,12 +669,12 @@ Upstream BatchPlanNode - Table 0 { columns: [ak1_k1, ak1_v, ak1_a__row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 1 { columns: [ak1_k1, ak1_a__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [count, a_k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } - Table 3 { columns: [a_k1, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [a_k1, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [v, bv, ak1.a._row_id, ak1.k1, a.k1], primary key: [$2 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [3] } + Table 0 { columns: [ak1_k1, ak1_v, ak1_a__row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [ak1_k1, ak1_a__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [count, a_k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 3 { columns: [a_k1, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [a_k1, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [v, bv, ak1.a._row_id, ak1.k1, a.k1], primary key: [$2 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [3], read pk prefix len hint: 3 } - id: aggk1_join_Ak1_onk1 before: - create_tables @@ -711,7 +711,7 @@ left table: 0, right table 2, left degree table: 1, right degree table: 3, StreamProject { exprs: [count, a.k1] } StreamHashAgg { group_key: [a.k1], aggs: [count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 StreamExchange Hash([0]) from 2 @@ -725,12 +725,12 @@ Upstream BatchPlanNode - Table 0 { columns: [count, a_k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } - Table 1 { columns: [a_k1, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 2 { columns: [ak1_k1, ak1_v, ak1_a__row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 3 { columns: [ak1_k1, ak1_a__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4 { columns: [a_k1, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [v, bv, a.k1, ak1.a._row_id], primary key: [$2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [2] } + Table 0 { columns: [count, a_k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 1 { columns: [a_k1, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [ak1_k1, ak1_v, ak1_a__row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [ak1_k1, ak1_a__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [a_k1, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [v, bv, a.k1, ak1.a._row_id], primary key: [$2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [2], read pk prefix len hint: 2 } - id: aggk1_join_aggk1_onk1 before: - create_tables @@ -777,11 +777,11 @@ left table: 0, right table 2, left degree table: 1, right degree table: 3, StreamProject { exprs: [count, a.k1] } StreamHashAgg { group_key: [a.k1], aggs: [count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 StreamProject { exprs: [count, b.k1] } StreamHashAgg { group_key: [b.k1], aggs: [count] } - result table: 5, state tables: [] + result table: 5, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 2 Fragment 1 @@ -794,13 +794,13 @@ Upstream BatchPlanNode - Table 0 { columns: [count, a_k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } - Table 1 { columns: [a_k1, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 2 { columns: [count, b_k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } - Table 3 { columns: [b_k1, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [a_k1, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 5 { columns: [b_k1, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [num, bv, a.k1, b.k1], primary key: [$2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [2] } + Table 0 { columns: [count, a_k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 1 { columns: [a_k1, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [count, b_k1], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 3 { columns: [b_k1, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [a_k1, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [b_k1, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [num, bv, a.k1, b.k1], primary key: [$2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [2], read pk prefix len hint: 2 } - sql: | create table t1 (row_id int, uid int, v int, created_at timestamp); select * from hop(t1, created_at, interval '15' minute, interval '30' minute); @@ -832,4 +832,4 @@ Upstream BatchPlanNode - Table 4294967294 { columns: [row_id, uid, v, created_at, window_start, window_end, t1._row_id], primary key: [$6 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [6] } + Table 4294967294 { columns: [row_id, uid, v, created_at, window_start, window_end, t1._row_id], primary key: [$6 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [6], read pk prefix len hint: 3 } diff --git a/src/frontend/planner_test/tests/testdata/join.yaml b/src/frontend/planner_test/tests/testdata/join.yaml index ab96f62f5d3c5..627769ddec642 100644 --- a/src/frontend/planner_test/tests/testdata/join.yaml +++ b/src/frontend/planner_test/tests/testdata/join.yaml @@ -668,12 +668,12 @@ Upstream BatchPlanNode - Table 0 { columns: [t_src, t_dst, t_src_0, t_dst_0, t__row_id, t__row_id_0], primary key: [$2 ASC, $0 ASC, $4 ASC, $5 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [0] } - Table 1 { columns: [t_src, t_src_0, t__row_id, t__row_id_0, t_dst, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [5], distribution key: [1] } - Table 2 { columns: [t_dst, t__row_id], primary key: [$0 ASC, $0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0] } - Table 3 { columns: [t_dst, t_dst_0, t__row_id, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [1] } - Table 4 { columns: [t_src, t_dst, t__row_id], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1] } - Table 5 { columns: [t_dst, t__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 6 { columns: [t_src, t_dst, t__row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 7 { columns: [t_src, t__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [p1, p2, p3, t._row_id, t._row_id#1, t.src, t._row_id#2], primary key: [$3 ASC, $4 ASC, $1 ASC, $6 ASC, $5 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0] } + Table 0 { columns: [t_src, t_dst, t_src_0, t_dst_0, t__row_id, t__row_id_0], primary key: [$2 ASC, $0 ASC, $4 ASC, $5 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [0], read pk prefix len hint: 2 } + Table 1 { columns: [t_src, t_src_0, t__row_id, t__row_id_0, t_dst, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [5], distribution key: [1], read pk prefix len hint: 2 } + Table 2 { columns: [t_dst, t__row_id], primary key: [$0 ASC, $0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 2 } + Table 3 { columns: [t_dst, t_dst_0, t__row_id, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [1], read pk prefix len hint: 2 } + Table 4 { columns: [t_src, t_dst, t__row_id], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1], read pk prefix len hint: 1 } + Table 5 { columns: [t_dst, t__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [t_src, t_dst, t__row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [t_src, t__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [p1, p2, p3, t._row_id, t._row_id#1, t.src, t._row_id#2], primary key: [$3 ASC, $4 ASC, $1 ASC, $6 ASC, $5 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0], read pk prefix len hint: 6 } diff --git a/src/frontend/planner_test/tests/testdata/nexmark.yaml b/src/frontend/planner_test/tests/testdata/nexmark.yaml index ece902d6b2403..aa363c7e569a6 100644 --- a/src/frontend/planner_test/tests/testdata/nexmark.yaml +++ b/src/frontend/planner_test/tests/testdata/nexmark.yaml @@ -53,7 +53,7 @@ Upstream BatchPlanNode - Table 4294967294 { columns: [auction, bidder, price, date_time, bid._row_id], primary key: [$4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [4] } + Table 4294967294 { columns: [auction, bidder, price, date_time, bid._row_id], primary key: [$4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [4], read pk prefix len hint: 1 } - id: nexmark_q1 before: - create_tables @@ -81,7 +81,7 @@ Upstream BatchPlanNode - Table 4294967294 { columns: [auction, bidder, price, date_time, bid._row_id], primary key: [$4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [4] } + Table 4294967294 { columns: [auction, bidder, price, date_time, bid._row_id], primary key: [$4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [4], read pk prefix len hint: 1 } - id: nexmark_q2 before: - create_tables @@ -103,7 +103,7 @@ Upstream BatchPlanNode - Table 4294967294 { columns: [auction, price, bid._row_id], primary key: [$2 ASC], value indices: [0, 1, 2], distribution key: [2] } + Table 4294967294 { columns: [auction, price, bid._row_id], primary key: [$2 ASC], value indices: [0, 1, 2], distribution key: [2], read pk prefix len hint: 1 } - id: nexmark_q3 before: - create_tables @@ -153,11 +153,11 @@ Upstream BatchPlanNode - Table 0 { columns: [auction_id, auction_seller], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [1] } - Table 1 { columns: [auction_seller, auction_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [person_id, person_name, person_city, person_state], primary key: [$0 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 3 { columns: [person_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [name, city, state, id, auction.seller, person.id], primary key: [$3 ASC, $5 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [4] } + Table 0 { columns: [auction_id, auction_seller], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 1 { columns: [auction_seller, auction_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [person_id, person_name, person_city, person_state], primary key: [$0 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [person_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [name, city, state, id, auction.seller, person.id], primary key: [$3 ASC, $5 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [4], read pk prefix len hint: 3 } - id: nexmark_q4 before: - create_tables @@ -203,13 +203,13 @@ materialized table: 4294967294 StreamProject { exprs: [auction.category, (sum(max(bid.price)) / count(max(bid.price))) as $expr1] } StreamHashAgg { group_key: [auction.category], aggs: [sum(max(bid.price)), count(max(bid.price)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([1]) from 1 Fragment 1 StreamProject { exprs: [auction.id, auction.category, max(bid.price)] } StreamHashAgg { group_key: [auction.id, auction.category], aggs: [max(bid.price), count] } - result table: 2, state tables: [1] + result table: 2, state tables: [1], distinct tables: [] StreamProject { exprs: [auction.id, auction.category, bid.price, bid._row_id] } StreamFilter { predicate: (bid.date_time >= auction.date_time) AND (bid.date_time <= auction.expires) } StreamHashJoin { type: Inner, predicate: auction.id = bid.auction, output: all } @@ -227,14 +227,14 @@ Upstream BatchPlanNode - Table 0 { columns: [auction_category, sum(max(bid_price)), count(max(bid_price)), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [0] } - Table 1 { columns: [auction_id, auction_category, bid_price, bid__row_id], primary key: [$0 ASC, $1 ASC, $2 DESC, $3 ASC], value indices: [0, 2, 3], distribution key: [0] } - Table 2 { columns: [auction_id, auction_category, max(bid_price), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0] } - Table 3 { columns: [auction_id, auction_date_time, auction_expires, auction_category], primary key: [$0 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 4 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 5 { columns: [bid_auction, bid_price, bid_date_time, bid__row_id], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 6 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [category, avg], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } + Table 0 { columns: [auction_category, sum(max(bid_price)), count(max(bid_price)), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [auction_id, auction_category, bid_price, bid__row_id], primary key: [$0 ASC, $1 ASC, $2 DESC, $3 ASC], value indices: [0, 2, 3], distribution key: [0], read pk prefix len hint: 2 } + Table 2 { columns: [auction_id, auction_category, max(bid_price), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0], read pk prefix len hint: 2 } + Table 3 { columns: [auction_id, auction_date_time, auction_expires, auction_category], primary key: [$0 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [bid_auction, bid_price, bid_date_time, bid__row_id], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [category, avg], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } - id: nexmark_q5 before: - create_tables @@ -319,7 +319,7 @@ StreamExchange Hash([2]) from 1 StreamProject { exprs: [max(count), window_start] } StreamHashAgg { group_key: [window_start], aggs: [max(count), count] } - result table: 6, state tables: [5] + result table: 6, state tables: [5], distinct tables: [] StreamExchange Hash([1]) from 4 Fragment 1 @@ -328,7 +328,7 @@ Fragment 2 StreamAppendOnlyHashAgg { group_key: [bid.auction, window_start], aggs: [count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamExchange Hash([0, 1]) from 3 Fragment 3 @@ -342,14 +342,14 @@ StreamProject { exprs: [bid.auction, window_start, count] } StreamExchange Hash([0, 1]) from 2 - Table 0 { columns: [bid_auction, count, window_start], primary key: [$2 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [2] } - Table 1 { columns: [window_start, bid_auction, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [max(count), window_start], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } - Table 3 { columns: [window_start, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [bid_auction, window_start, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1] } - Table 5 { columns: [window_start, count, bid_auction], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 6 { columns: [window_start, max(count), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [auction, num, window_start, window_start#1], primary key: [$0 ASC, $2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [2] } + Table 0 { columns: [bid_auction, count, window_start], primary key: [$2 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [2], read pk prefix len hint: 1 } + Table 1 { columns: [window_start, bid_auction, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [max(count), window_start], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 3 { columns: [window_start, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [bid_auction, window_start, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 5 { columns: [window_start, count, bid_auction], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [window_start, max(count), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction, num, window_start, window_start#1], primary key: [$0 ASC, $2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [2], read pk prefix len hint: 3 } - id: nexmark_q6 before: - create_tables @@ -434,7 +434,7 @@ Fragment 2 StreamProject { exprs: [max(bid.price), $expr1, ($expr1 - '00:00:10':Interval) as $expr2] } StreamAppendOnlyHashAgg { group_key: [$expr1], aggs: [max(bid.price), count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 3 Fragment 3 @@ -443,12 +443,12 @@ Upstream BatchPlanNode - Table 0 { columns: [bid_auction, bid_bidder, bid_price, bid_date_time, bid__row_id], primary key: [$2 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2] } - Table 1 { columns: [bid_price, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [max(bid_price), $expr1, $expr2], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 3 { columns: [max(bid_price), $expr1, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4 { columns: [$expr1, max(bid_price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [auction, price, bidder, date_time, bid._row_id, $expr1], primary key: [$4 ASC, $5 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1] } + Table 0 { columns: [bid_auction, bid_bidder, bid_price, bid_date_time, bid__row_id], primary key: [$2 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2], read pk prefix len hint: 1 } + Table 1 { columns: [bid_price, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [max(bid_price), $expr1, $expr2], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [max(bid_price), $expr1, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [$expr1, max(bid_price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction, price, bidder, date_time, bid._row_id, $expr1], primary key: [$4 ASC, $5 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1], read pk prefix len hint: 3 } - id: nexmark_q8 before: - create_tables @@ -518,13 +518,13 @@ StreamExchange Hash([0, 2, 3]) from 1 StreamProject { exprs: [auction.seller, $expr3, $expr4] } StreamHashAgg { group_key: [auction.seller, $expr3, $expr4], aggs: [count] } - result table: 5, state tables: [] + result table: 5, state tables: [], distinct tables: [] StreamExchange Hash([0, 1, 2]) from 2 Fragment 1 StreamProject { exprs: [person.id, person.name, $expr1, $expr2] } StreamHashAgg { group_key: [person.id, person.name, $expr1, $expr2], aggs: [count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamProject { exprs: [person.id, person.name, TumbleStart(person.date_time, '00:00:10':Interval) as $expr1, (TumbleStart(person.date_time, '00:00:10':Interval) + '00:00:10':Interval) as $expr2] } Chain { table: person, columns: [person.id, person.name, person.date_time], pk: [person.id], dist: UpstreamHashShard(person.id) } Upstream @@ -536,13 +536,13 @@ Upstream BatchPlanNode - Table 0 { columns: [person_id, person_name, $expr1, $expr2], primary key: [$0 ASC, $2 ASC, $3 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [0, 2, 3] } - Table 1 { columns: [person_id, $expr1, $expr2, person_name, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1, 2] } - Table 2 { columns: [auction_seller, $expr3, $expr4], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0, 1, 2] } - Table 3 { columns: [auction_seller, $expr3, $expr4, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2] } - Table 4 { columns: [person_id, person_name, $expr1, $expr2, count], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 5 { columns: [auction_seller, $expr3, $expr4, count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2] } - Table 4294967294 { columns: [id, name, starttime, $expr2, auction.seller, $expr3, $expr4], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0, 2, 3] } + Table 0 { columns: [person_id, person_name, $expr1, $expr2], primary key: [$0 ASC, $2 ASC, $3 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [0, 2, 3], read pk prefix len hint: 3 } + Table 1 { columns: [person_id, $expr1, $expr2, person_name, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 2 { columns: [auction_seller, $expr3, $expr4], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 3 { columns: [auction_seller, $expr3, $expr4, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 4 { columns: [person_id, person_name, $expr1, $expr2, count], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 4 } + Table 5 { columns: [auction_seller, $expr3, $expr4, count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 4294967294 { columns: [id, name, starttime, $expr2, auction.seller, $expr3, $expr4], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0, 2, 3], read pk prefix len hint: 7 } - id: nexmark_q9 before: - create_tables @@ -614,12 +614,12 @@ Upstream BatchPlanNode - Table 0 { columns: [auction_id, auction_item_name, auction_description, auction_initial_bid, auction_reserve, auction_date_time, auction_expires, auction_seller, auction_category, bid_auction, bid_bidder, bid_price, bid_channel, bid_url, bid_date_time, bid_extra, bid__row_id], primary key: [$0 ASC, $11 DESC, $14 ASC, $16 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], distribution key: [0] } - Table 1 { columns: [auction_id, auction_item_name, auction_description, auction_initial_bid, auction_reserve, auction_date_time, auction_expires, auction_seller, auction_category], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0] } - Table 2 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 3 { columns: [bid_auction, bid_bidder, bid_price, bid_channel, bid_url, bid_date_time, bid_extra, bid__row_id], primary key: [$0 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [0] } - Table 4 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [id, item_name, description, initial_bid, reserve, date_time, expires, seller, category, auction, bidder, price, bid_date_time, bid._row_id], primary key: [$0 ASC, $13 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], distribution key: [0] } + Table 0 { columns: [auction_id, auction_item_name, auction_description, auction_initial_bid, auction_reserve, auction_date_time, auction_expires, auction_seller, auction_category, bid_auction, bid_bidder, bid_price, bid_channel, bid_url, bid_date_time, bid_extra, bid__row_id], primary key: [$0 ASC, $11 DESC, $14 ASC, $16 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [auction_id, auction_item_name, auction_description, auction_initial_bid, auction_reserve, auction_date_time, auction_expires, auction_seller, auction_category], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [bid_auction, bid_bidder, bid_price, bid_channel, bid_url, bid_date_time, bid_extra, bid__row_id], primary key: [$0 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [id, item_name, description, initial_bid, reserve, date_time, expires, seller, category, auction, bidder, price, bid_date_time, bid._row_id], primary key: [$0 ASC, $13 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], distribution key: [0], read pk prefix len hint: 2 } - id: nexmark_q10 before: - create_tables @@ -642,7 +642,7 @@ Upstream BatchPlanNode - Table 4294967294 { columns: [auction, bidder, price, date_time, date, time, bid._row_id], primary key: [$6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [6] } + Table 4294967294 { columns: [auction, bidder, price, date_time, date, time, bid._row_id], primary key: [$6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [6], read pk prefix len hint: 1 } - id: nexmark_q11 before: - create_tables @@ -732,7 +732,7 @@ Upstream BatchPlanNode - Table 4294967294 { columns: [auction, bidder, price, bidtimetype, date_time, extra, bid._row_id], primary key: [$6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [6] } + Table 4294967294 { columns: [auction, bidder, price, bidtimetype, date_time, extra, bid._row_id], primary key: [$6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [6], read pk prefix len hint: 1 } - id: nexmark_q15 before: - create_tables @@ -774,7 +774,7 @@ StreamMaterialize { columns: [day, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], pk_columns: [day], pk_conflict: "no check" } materialized table: 4294967294 StreamAppendOnlyHashAgg { group_key: [$expr1], aggs: [count, count filter((bid.price < 10000:Int32)), count filter((bid.price >= 10000:Int32) AND (bid.price < 1000000:Int32)), count filter((bid.price >= 1000000:Int32)), count(distinct bid.bidder), count(distinct bid.bidder) filter((bid.price < 10000:Int32)), count(distinct bid.bidder) filter((bid.price >= 10000:Int32) AND (bid.price < 1000000:Int32)), count(distinct bid.bidder) filter((bid.price >= 1000000:Int32)), count(distinct bid.auction), count(distinct bid.auction) filter((bid.price < 10000:Int32)), count(distinct bid.auction) filter((bid.price >= 10000:Int32) AND (bid.price < 1000000:Int32)), count(distinct bid.auction) filter((bid.price >= 1000000:Int32))] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [(distinct key: bid.bidder, table id: 1), (distinct key: bid.auction, table id: 2)] StreamExchange Hash([0]) from 1 Fragment 1 @@ -783,8 +783,10 @@ Upstream BatchPlanNode - Table 0 { columns: [$expr1, count, count filter((bid_price < 10000:Int32)), count filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count filter((bid_price >= 1000000:Int32)), count(distinct bid_bidder), count(distinct bid_bidder) filter((bid_price < 10000:Int32)), count(distinct bid_bidder) filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count(distinct bid_bidder) filter((bid_price >= 1000000:Int32)), count(distinct bid_auction), count(distinct bid_auction) filter((bid_price < 10000:Int32)), count(distinct bid_auction) filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count(distinct bid_auction) filter((bid_price >= 1000000:Int32))], primary key: [$0 ASC], value indices: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [0] } - Table 4294967294 { columns: [day, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [0] } + Table 0 { columns: [$expr1, count, count filter((bid_price < 10000:Int32)), count filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count filter((bid_price >= 1000000:Int32)), count(distinct bid_bidder), count(distinct bid_bidder) filter((bid_price < 10000:Int32)), count(distinct bid_bidder) filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count(distinct bid_bidder) filter((bid_price >= 1000000:Int32)), count(distinct bid_auction), count(distinct bid_auction) filter((bid_price < 10000:Int32)), count(distinct bid_auction) filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count(distinct bid_auction) filter((bid_price >= 1000000:Int32))], primary key: [$0 ASC], value indices: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [$expr1, bid_bidder, count_for_agg_call_4, count_for_agg_call_5, count_for_agg_call_6, count_for_agg_call_7], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5], distribution key: [0], read pk prefix len hint: 0 } + Table 2 { columns: [$expr1, bid_auction, count_for_agg_call_8, count_for_agg_call_9, count_for_agg_call_10, count_for_agg_call_11], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5], distribution key: [0], read pk prefix len hint: 0 } + Table 4294967294 { columns: [day, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [0], read pk prefix len hint: 1 } - id: nexmark_q16 before: - create_tables @@ -828,7 +830,7 @@ StreamMaterialize { columns: [channel, day, minute, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], pk_columns: [channel, day], pk_conflict: "no check" } materialized table: 4294967294 StreamAppendOnlyHashAgg { group_key: [bid.channel, $expr1], aggs: [max($expr2), count, count filter((bid.price < 10000:Int32)), count filter((bid.price >= 10000:Int32) AND (bid.price < 1000000:Int32)), count filter((bid.price >= 1000000:Int32)), count(distinct bid.bidder), count(distinct bid.bidder) filter((bid.price < 10000:Int32)), count(distinct bid.bidder) filter((bid.price >= 10000:Int32) AND (bid.price < 1000000:Int32)), count(distinct bid.bidder) filter((bid.price >= 1000000:Int32)), count(distinct bid.auction), count(distinct bid.auction) filter((bid.price < 10000:Int32)), count(distinct bid.auction) filter((bid.price >= 10000:Int32) AND (bid.price < 1000000:Int32)), count(distinct bid.auction) filter((bid.price >= 1000000:Int32))] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [(distinct key: bid.bidder, table id: 1), (distinct key: bid.auction, table id: 2)] StreamExchange Hash([0, 1]) from 1 Fragment 1 @@ -837,8 +839,10 @@ Upstream BatchPlanNode - Table 0 { columns: [bid_channel, $expr1, max($expr2), count, count filter((bid_price < 10000:Int32)), count filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count filter((bid_price >= 1000000:Int32)), count(distinct bid_bidder), count(distinct bid_bidder) filter((bid_price < 10000:Int32)), count(distinct bid_bidder) filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count(distinct bid_bidder) filter((bid_price >= 1000000:Int32)), count(distinct bid_auction), count(distinct bid_auction) filter((bid_price < 10000:Int32)), count(distinct bid_auction) filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count(distinct bid_auction) filter((bid_price >= 1000000:Int32))], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0, 1] } - Table 4294967294 { columns: [channel, day, minute, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0, 1] } + Table 0 { columns: [bid_channel, $expr1, max($expr2), count, count filter((bid_price < 10000:Int32)), count filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count filter((bid_price >= 1000000:Int32)), count(distinct bid_bidder), count(distinct bid_bidder) filter((bid_price < 10000:Int32)), count(distinct bid_bidder) filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count(distinct bid_bidder) filter((bid_price >= 1000000:Int32)), count(distinct bid_auction), count(distinct bid_auction) filter((bid_price < 10000:Int32)), count(distinct bid_auction) filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count(distinct bid_auction) filter((bid_price >= 1000000:Int32))], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 1 { columns: [bid_channel, $expr1, bid_bidder, count_for_agg_call_5, count_for_agg_call_6, count_for_agg_call_7, count_for_agg_call_8], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3, 4, 5, 6], distribution key: [0, 1], read pk prefix len hint: 0 } + Table 2 { columns: [bid_channel, $expr1, bid_auction, count_for_agg_call_9, count_for_agg_call_10, count_for_agg_call_11, count_for_agg_call_12], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3, 4, 5, 6], distribution key: [0, 1], read pk prefix len hint: 0 } + Table 4294967294 { columns: [channel, day, minute, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0, 1], read pk prefix len hint: 2 } - id: nexmark_q17 before: - create_tables @@ -876,7 +880,7 @@ materialized table: 4294967294 StreamProject { exprs: [bid.auction, $expr1, count, count filter((bid.price < 10000:Int32)), count filter((bid.price >= 10000:Int32) AND (bid.price < 1000000:Int32)), count filter((bid.price >= 1000000:Int32)), min(bid.price), max(bid.price), (sum(bid.price) / count(bid.price)) as $expr2, sum(bid.price)] } StreamAppendOnlyHashAgg { group_key: [bid.auction, $expr1], aggs: [count, count filter((bid.price < 10000:Int32)), count filter((bid.price >= 10000:Int32) AND (bid.price < 1000000:Int32)), count filter((bid.price >= 1000000:Int32)), min(bid.price), max(bid.price), sum(bid.price), count(bid.price)] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0, 1]) from 1 Fragment 1 @@ -885,8 +889,8 @@ Upstream BatchPlanNode - Table 0 { columns: [bid_auction, $expr1, count, count filter((bid_price < 10000:Int32)), count filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count filter((bid_price >= 1000000:Int32)), min(bid_price), max(bid_price), sum(bid_price), count(bid_price)], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0, 1] } - Table 4294967294 { columns: [auction, day, total_bids, rank1_bids, rank2_bids, rank3_bids, min_price, max_price, avg_price, sum_price], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0, 1] } + Table 0 { columns: [bid_auction, $expr1, count, count filter((bid_price < 10000:Int32)), count filter((bid_price >= 10000:Int32) AND (bid_price < 1000000:Int32)), count filter((bid_price >= 1000000:Int32)), min(bid_price), max(bid_price), sum(bid_price), count(bid_price)], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 4294967294 { columns: [auction, day, total_bids, rank1_bids, rank2_bids, rank3_bids, min_price, max_price, avg_price, sum_price], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0, 1], read pk prefix len hint: 2 } - id: nexmark_q18 before: - create_tables @@ -931,8 +935,8 @@ Upstream BatchPlanNode - Table 0 { columns: [bid_auction, bid_bidder, bid_price, bid_channel, bid_url, bid_date_time, bid_extra, bid__row_id], primary key: [$1 ASC, $0 ASC, $5 DESC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [1, 0] } - Table 4294967294 { columns: [auction, bidder, price, channel, url, date_time, extra, bid._row_id], primary key: [$7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [7] } + Table 0 { columns: [bid_auction, bid_bidder, bid_price, bid_channel, bid_url, bid_date_time, bid_extra, bid__row_id], primary key: [$1 ASC, $0 ASC, $5 DESC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [1, 0], read pk prefix len hint: 2 } + Table 4294967294 { columns: [auction, bidder, price, channel, url, date_time, extra, bid._row_id], primary key: [$7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [7], read pk prefix len hint: 1 } - id: nexmark_q19 before: - create_tables @@ -995,11 +999,11 @@ Upstream BatchPlanNode - Table 0 { columns: [bid_auction, bid_bidder, bid_price, bid_channel, bid_url, bid_date_time, bid__row_id], primary key: [$0 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0] } - Table 1 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [auction_id, auction_item_name, auction_description, auction_initial_bid, auction_reserve, auction_date_time, auction_expires, auction_seller, auction_category], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0] } - Table 3 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [auction, bidder, price, channel, url, date_timeb, item_name, description, initial_bid, reserve, date_timea, expires, seller, category, bid._row_id, auction.id], primary key: [$14 ASC, $15 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], distribution key: [0] } + Table 0 { columns: [bid_auction, bid_bidder, bid_price, bid_channel, bid_url, bid_date_time, bid__row_id], primary key: [$0 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [auction_id, auction_item_name, auction_description, auction_initial_bid, auction_reserve, auction_date_time, auction_expires, auction_seller, auction_category], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction, bidder, price, channel, url, date_timeb, item_name, description, initial_bid, reserve, date_timea, expires, seller, category, bid._row_id, auction.id], primary key: [$14 ASC, $15 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], distribution key: [0], read pk prefix len hint: 3 } - id: nexmark_q21 before: - create_tables @@ -1045,7 +1049,7 @@ Upstream BatchPlanNode - Table 4294967294 { columns: [auction, bidder, price, channel, dir1, dir2, dir3, bid._row_id], primary key: [$7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [7] } + Table 4294967294 { columns: [auction, bidder, price, channel, dir1, dir2, dir3, bid._row_id], primary key: [$7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [7], read pk prefix len hint: 1 } - id: nexmark_q101 before: - create_tables @@ -1092,7 +1096,7 @@ StreamExchange Hash([0]) from 1 StreamProject { exprs: [bid.auction, max(bid.price)] } StreamAppendOnlyHashAgg { group_key: [bid.auction], aggs: [max(bid.price), count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 2 Fragment 1 @@ -1105,12 +1109,12 @@ Upstream BatchPlanNode - Table 0 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 1 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 2 { columns: [bid_auction, max(bid_price)], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 3 { columns: [bid_auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [bid_auction, max(bid_price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [auction_id, auction_item_name, current_highest_bid, bid.auction], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } + Table 0 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [bid_auction, max(bid_price)], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [bid_auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [bid_auction, max(bid_price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction_id, auction_item_name, current_highest_bid, bid.auction], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 2 } - id: nexmark_q102 before: - create_tables @@ -1169,7 +1173,7 @@ left table: 0, right table 1 StreamProject { exprs: [auction.id, auction.item_name, count(bid.auction)] } StreamHashAgg { group_key: [auction.id, auction.item_name], aggs: [count(bid.auction), count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamHashJoin { type: Inner, predicate: auction.id = bid.auction, output: all } left table: 3, right table 5, left degree table: 4, right degree table: 6, StreamExchange Hash([0]) from 1 @@ -1189,12 +1193,12 @@ Fragment 3 StreamProject { exprs: [(sum0(count) / count(bid.auction)) as $expr1] } StreamGlobalSimpleAgg { aggs: [sum0(count), count(bid.auction), count] } - result table: 7, state tables: [] + result table: 7, state tables: [], distinct tables: [] StreamExchange Single from 4 Fragment 4 StreamAppendOnlyHashAgg { group_key: [bid.auction], aggs: [count] } - result table: 8, state tables: [] + result table: 8, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 5 Fragment 5 @@ -1202,16 +1206,16 @@ Upstream BatchPlanNode - Table 0 { columns: [auction_id, auction_item_name, count(bid_auction)], primary key: [$2 ASC, $0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 1 { columns: [$expr1], primary key: [], value indices: [0], distribution key: [] } - Table 2 { columns: [auction_id, auction_item_name, count(bid_auction), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0] } - Table 3 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 4 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 5 { columns: [bid_auction, bid__row_id], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0] } - Table 6 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 7 { columns: [sum0(count), count(bid_auction), count], primary key: [], value indices: [0, 1, 2], distribution key: [] } - Table 8 { columns: [bid_auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [auction_id, auction_item_name, bid_count], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0] } + Table 0 { columns: [auction_id, auction_item_name, count(bid_auction)], primary key: [$2 ASC, $0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 0 } + Table 1 { columns: [$expr1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } + Table 2 { columns: [auction_id, auction_item_name, count(bid_auction), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0], read pk prefix len hint: 2 } + Table 3 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [bid_auction, bid__row_id], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [sum0(count), count(bid_auction), count], primary key: [], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 0 } + Table 8 { columns: [bid_auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction_id, auction_item_name, bid_count], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 2 } - id: nexmark_q103 before: - create_tables @@ -1258,7 +1262,7 @@ StreamProject { exprs: [bid.auction] } StreamFilter { predicate: (count >= 20:Int32) } StreamAppendOnlyHashAgg { group_key: [bid.auction], aggs: [count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 2 Fragment 1 @@ -1271,12 +1275,12 @@ Upstream BatchPlanNode - Table 0 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 1 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 2 { columns: [bid_auction], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 3 { columns: [bid_auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [bid_auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } + Table 0 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [bid_auction], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [bid_auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [bid_auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } - id: nexmark_q104 before: - create_tables @@ -1323,7 +1327,7 @@ StreamProject { exprs: [bid.auction] } StreamFilter { predicate: (count < 20:Int32) } StreamAppendOnlyHashAgg { group_key: [bid.auction], aggs: [count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 2 Fragment 1 @@ -1336,12 +1340,12 @@ Upstream BatchPlanNode - Table 0 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 1 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 2 { columns: [bid_auction], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 3 { columns: [bid_auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [bid_auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } + Table 0 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [bid_auction], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [bid_auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [bid_auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } - id: nexmark_q105 before: - create_tables @@ -1397,7 +1401,7 @@ StreamProject { exprs: [auction.id, auction.item_name, count(bid.auction), Vnode(auction.id) as $expr1] } StreamProject { exprs: [auction.id, auction.item_name, count(bid.auction)] } StreamHashAgg { group_key: [auction.id, auction.item_name], aggs: [count(bid.auction), count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamHashJoin { type: Inner, predicate: auction.id = bid.auction, output: all } left table: 3, right table 5, left degree table: 4, right degree table: 6, StreamExchange Hash([0]) from 2 @@ -1413,14 +1417,14 @@ Upstream BatchPlanNode - Table 0 { columns: [auction_id, auction_item_name, count(bid_auction), $expr1], primary key: [$2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [] } - Table 1 { columns: [auction_id, auction_item_name, count(bid_auction), $expr1], primary key: [$3 ASC, $2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [0], vnode column idx: 3 } - Table 2 { columns: [auction_id, auction_item_name, count(bid_auction), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0] } - Table 3 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 4 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 5 { columns: [bid_auction, bid__row_id], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0] } - Table 6 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [auction_id, auction_item_name, bid_count], primary key: [$2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [] } + Table 0 { columns: [auction_id, auction_item_name, count(bid_auction), $expr1], primary key: [$2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [auction_id, auction_item_name, count(bid_auction), $expr1], primary key: [$3 ASC, $2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1, vnode column idx: 3 } + Table 2 { columns: [auction_id, auction_item_name, count(bid_auction), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0], read pk prefix len hint: 2 } + Table 3 { columns: [auction_id, auction_item_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [bid_auction, bid__row_id], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction_id, auction_item_name, bid_count], primary key: [$2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 2 } - id: nexmark_q106 before: - create_tables @@ -1476,16 +1480,16 @@ materialized table: 4294967294 StreamProject { exprs: [min(min(max(bid.price)))] } StreamGlobalSimpleAgg { aggs: [min(min(max(bid.price))), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Single from 1 Fragment 1 StreamHashAgg { group_key: [$expr1], aggs: [min(max(bid.price)), count] } - result table: 3, state tables: [2] + result table: 3, state tables: [2], distinct tables: [] StreamProject { exprs: [auction.id, max(bid.price), Vnode(auction.id) as $expr1] } StreamProject { exprs: [auction.id, max(bid.price)] } StreamHashAgg { group_key: [auction.id], aggs: [max(bid.price), count] } - result table: 5, state tables: [4] + result table: 5, state tables: [4], distinct tables: [] StreamProject { exprs: [auction.id, bid.price, bid._row_id] } StreamFilter { predicate: (bid.date_time >= auction.date_time) AND (bid.date_time <= auction.expires) } StreamHashJoin { type: Inner, predicate: auction.id = bid.auction, output: all } @@ -1503,14 +1507,14 @@ Upstream BatchPlanNode - Table 0 { columns: [min(max(bid_price)), $expr1], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [] } - Table 1 { columns: [min(min(max(bid_price))), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 2 { columns: [$expr1, max(bid_price), auction_id], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [1, 2], distribution key: [2], vnode column idx: 0 } - Table 3 { columns: [$expr1, min(max(bid_price)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [], vnode column idx: 0 } - Table 4 { columns: [auction_id, bid_price, bid__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 5 { columns: [auction_id, max(bid_price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 6 { columns: [auction_id, auction_date_time, auction_expires], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 7 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 8 { columns: [bid_auction, bid_price, bid_date_time, bid__row_id], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 9 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [min_final], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [min(max(bid_price)), $expr1], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [min(min(max(bid_price))), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 2 { columns: [$expr1, max(bid_price), auction_id], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [1, 2], distribution key: [2], read pk prefix len hint: 1, vnode column idx: 0 } + Table 3 { columns: [$expr1, min(max(bid_price)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [], read pk prefix len hint: 1, vnode column idx: 0 } + Table 4 { columns: [auction_id, bid_price, bid__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [auction_id, max(bid_price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [auction_id, auction_date_time, auction_expires], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [auction_id, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 8 { columns: [bid_auction, bid_price, bid_date_time, bid__row_id], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [bid_auction, bid__row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [min_final], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } diff --git a/src/frontend/planner_test/tests/testdata/nexmark_source.yaml b/src/frontend/planner_test/tests/testdata/nexmark_source.yaml index 773569f9982b1..e06d0bf0db533 100644 --- a/src/frontend/planner_test/tests/testdata/nexmark_source.yaml +++ b/src/frontend/planner_test/tests/testdata/nexmark_source.yaml @@ -68,8 +68,8 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 0 - Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction, bidder, price, date_time, _row_id], primary key: [$4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [4] } + Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction, bidder, price, date_time, _row_id], primary key: [$4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [4], read pk prefix len hint: 1 } - id: nexmark_q1 before: - create_sources @@ -102,8 +102,8 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 0 - Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction, bidder, price, date_time, _row_id], primary key: [$4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [4] } + Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction, bidder, price, date_time, _row_id], primary key: [$4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [4], read pk prefix len hint: 1 } - id: nexmark_q2 before: - create_sources @@ -133,8 +133,8 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 0 - Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction, price, _row_id], primary key: [$2 ASC], value indices: [0, 1, 2], distribution key: [2] } + Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction, price, _row_id], primary key: [$2 ASC], value indices: [0, 1, 2], distribution key: [2], read pk prefix len hint: 1 } - id: nexmark_q3 before: - create_sources @@ -192,13 +192,13 @@ StreamSource { source: "person", columns: ["id", "name", "email_address", "credit_card", "city", "state", "date_time", "_row_id"] } source state table: 5 - Table 0 { columns: [id, seller, _row_id], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1] } - Table 1 { columns: [seller, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [id, name, city, state, _row_id], primary key: [$0 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0] } - Table 3 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 5 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [name, city, state, id, _row_id, seller, _row_id#1], primary key: [$4 ASC, $6 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [5] } + Table 0 { columns: [id, seller, _row_id], primary key: [$1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1], read pk prefix len hint: 1 } + Table 1 { columns: [seller, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [id, name, city, state, _row_id], primary key: [$0 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 5 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [name, city, state, id, _row_id, seller, _row_id#1], primary key: [$4 ASC, $6 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [5], read pk prefix len hint: 3 } - id: nexmark_q4 before: - create_sources @@ -250,13 +250,13 @@ materialized table: 4294967294 StreamProject { exprs: [category, (sum(max(price))::Decimal / count(max(price))) as $expr1] } StreamHashAgg { group_key: [category], aggs: [sum(max(price)), count(max(price)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([1]) from 1 Fragment 1 StreamProject { exprs: [id, category, max(price)] } StreamAppendOnlyHashAgg { group_key: [id, category], aggs: [max(price), count] } - result table: 1, state tables: [] + result table: 1, state tables: [], distinct tables: [] StreamProject { exprs: [id, category, price, _row_id, _row_id] } StreamFilter { predicate: (date_time >= date_time) AND (date_time <= expires) } StreamAppendOnlyHashJoin { type: Inner, predicate: id = auction, output: all } @@ -276,15 +276,15 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 7 - Table 0 { columns: [category, sum(max(price)), count(max(price)), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [0] } - Table 1 { columns: [id, category, max(price), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0] } - Table 2 { columns: [id, date_time, expires, category, _row_id], primary key: [$0 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0] } - Table 3 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4 { columns: [auction, price, date_time, _row_id], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 5 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 6 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 7 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [category, avg], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } + Table 0 { columns: [category, sum(max(price)), count(max(price)), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [id, category, max(price), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0], read pk prefix len hint: 2 } + Table 2 { columns: [id, date_time, expires, category, _row_id], primary key: [$0 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [auction, price, date_time, _row_id], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 7 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [category, avg], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } - id: nexmark_q5 before: - create_sources @@ -375,7 +375,7 @@ StreamExchange Hash([2]) from 1 StreamProject { exprs: [max(count), window_start] } StreamHashAgg { group_key: [window_start], aggs: [max(count), count] } - result table: 7, state tables: [6] + result table: 7, state tables: [6], distinct tables: [] StreamExchange Hash([1]) from 4 Fragment 1 @@ -384,7 +384,7 @@ Fragment 2 StreamAppendOnlyHashAgg { group_key: [auction, window_start], aggs: [count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamExchange Hash([0, 1]) from 3 Fragment 3 @@ -399,15 +399,15 @@ StreamProject { exprs: [auction, window_start, count] } StreamExchange Hash([0, 1]) from 2 - Table 0 { columns: [auction, count, window_start], primary key: [$2 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [2] } - Table 1 { columns: [window_start, auction, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [max(count), window_start], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } - Table 3 { columns: [window_start, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [auction, window_start, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1] } - Table 5 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 6 { columns: [window_start, count, auction], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 7 { columns: [window_start, max(count), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [auction, num, window_start, window_start#1], primary key: [$0 ASC, $2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [2] } + Table 0 { columns: [auction, count, window_start], primary key: [$2 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [2], read pk prefix len hint: 1 } + Table 1 { columns: [window_start, auction, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [max(count), window_start], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 3 { columns: [window_start, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [auction, window_start, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 5 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 6 { columns: [window_start, count, auction], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [window_start, max(count), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction, num, window_start, window_start#1], primary key: [$0 ASC, $2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [2], read pk prefix len hint: 3 } - id: nexmark_q6 before: - create_sources @@ -505,20 +505,20 @@ Fragment 3 StreamProject { exprs: [max(price), $expr1, ($expr1 - '00:00:10':Interval) as $expr2] } StreamAppendOnlyHashAgg { group_key: [$expr1], aggs: [max(price), count] } - result table: 5, state tables: [] + result table: 5, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 4 Fragment 4 StreamProject { exprs: [(TumbleStart(date_time, '00:00:10':Interval) + '00:00:10':Interval) as $expr1, price, _row_id] } StreamExchange Hash([4]) from 2 - Table 0 { columns: [auction, bidder, price, date_time, _row_id], primary key: [$2 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2] } - Table 1 { columns: [price, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [max(price), $expr1, $expr2], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 3 { columns: [max(price), $expr1, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 5 { columns: [$expr1, max(price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [auction, price, bidder, date_time, _row_id, $expr1], primary key: [$4 ASC, $5 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1] } + Table 0 { columns: [auction, bidder, price, date_time, _row_id], primary key: [$2 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2], read pk prefix len hint: 1 } + Table 1 { columns: [price, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [max(price), $expr1, $expr2], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [max(price), $expr1, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 5 { columns: [$expr1, max(price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction, price, bidder, date_time, _row_id, $expr1], primary key: [$4 ASC, $5 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1], read pk prefix len hint: 3 } - id: nexmark_q8 before: - create_sources @@ -592,13 +592,13 @@ StreamExchange Hash([0, 2, 3]) from 1 StreamProject { exprs: [seller, $expr3, $expr4] } StreamAppendOnlyHashAgg { group_key: [seller, $expr3, $expr4], aggs: [count] } - result table: 6, state tables: [] + result table: 6, state tables: [], distinct tables: [] StreamExchange Hash([0, 1, 2]) from 3 Fragment 1 StreamProject { exprs: [id, name, $expr1, $expr2] } StreamAppendOnlyHashAgg { group_key: [id, name, $expr1, $expr2], aggs: [count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamExchange Hash([0, 1, 2, 3]) from 2 Fragment 2 @@ -613,15 +613,15 @@ StreamSource { source: "auction", columns: ["id", "item_name", "description", "initial_bid", "reserve", "date_time", "expires", "seller", "category", "_row_id"] } source state table: 7 - Table 0 { columns: [id, name, $expr1, $expr2], primary key: [$0 ASC, $2 ASC, $3 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [0, 2, 3] } - Table 1 { columns: [id, $expr1, $expr2, name, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1, 2] } - Table 2 { columns: [seller, $expr3, $expr4], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0, 1, 2] } - Table 3 { columns: [seller, $expr3, $expr4, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2] } - Table 4 { columns: [id, name, $expr1, $expr2, count], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1, 2, 3] } - Table 5 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 6 { columns: [seller, $expr3, $expr4, count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2] } - Table 7 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [id, name, starttime, $expr2, seller, $expr3, $expr4], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0, 2, 3] } + Table 0 { columns: [id, name, $expr1, $expr2], primary key: [$0 ASC, $2 ASC, $3 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [0, 2, 3], read pk prefix len hint: 3 } + Table 1 { columns: [id, $expr1, $expr2, name, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 2 { columns: [seller, $expr3, $expr4], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 3 { columns: [seller, $expr3, $expr4, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 4 { columns: [id, name, $expr1, $expr2, count], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1, 2, 3], read pk prefix len hint: 4 } + Table 5 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 6 { columns: [seller, $expr3, $expr4, count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 7 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [id, name, starttime, $expr2, seller, $expr3, $expr4], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0, 2, 3], read pk prefix len hint: 7 } - id: nexmark_q9 before: - create_sources @@ -695,14 +695,14 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 6 - Table 0 { columns: [id, item_name, description, initial_bid, reserve, date_time, expires, seller, category, _row_id, auction, bidder, price, channel, url, date_time_0, extra, _row_id_0], primary key: [$0 ASC, $12 DESC, $15 ASC, $9 ASC, $17 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], distribution key: [0] } - Table 1 { columns: [id, item_name, description, initial_bid, reserve, date_time, expires, seller, category, _row_id], primary key: [$0 ASC, $9 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0] } - Table 2 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 3 { columns: [auction, bidder, price, channel, url, date_time, extra, _row_id], primary key: [$0 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [0] } - Table 4 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 5 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 6 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [id, item_name, description, initial_bid, reserve, date_time, expires, seller, category, auction, bidder, price, bid_date_time, _row_id, _row_id#1], primary key: [$13 ASC, $14 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0] } + Table 0 { columns: [id, item_name, description, initial_bid, reserve, date_time, expires, seller, category, _row_id, auction, bidder, price, channel, url, date_time_0, extra, _row_id_0], primary key: [$0 ASC, $12 DESC, $15 ASC, $9 ASC, $17 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [id, item_name, description, initial_bid, reserve, date_time, expires, seller, category, _row_id], primary key: [$0 ASC, $9 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [auction, bidder, price, channel, url, date_time, extra, _row_id], primary key: [$0 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 6 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [id, item_name, description, initial_bid, reserve, date_time, expires, seller, category, auction, bidder, price, bid_date_time, _row_id, _row_id#1], primary key: [$13 ASC, $14 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0], read pk prefix len hint: 3 } - id: nexmark_q10 before: - create_sources @@ -730,8 +730,8 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 0 - Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction, bidder, price, date_time, date, time, _row_id], primary key: [$6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [6] } + Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction, bidder, price, date_time, date, time, _row_id], primary key: [$6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [6], read pk prefix len hint: 1 } - id: nexmark_q11 before: - create_sources @@ -826,8 +826,8 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 0 - Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction, bidder, price, bidtimetype, date_time, extra, _row_id], primary key: [$6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [6] } + Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction, bidder, price, bidtimetype, date_time, extra, _row_id], primary key: [$6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [6], read pk prefix len hint: 1 } - id: nexmark_q15 before: - create_sources @@ -870,7 +870,7 @@ StreamMaterialize { columns: [day, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], pk_columns: [day], pk_conflict: "no check" } materialized table: 4294967294 StreamAppendOnlyHashAgg { group_key: [$expr1], aggs: [count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), count(distinct bidder), count(distinct bidder) filter((price < 10000:Int32)), count(distinct bidder) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct bidder) filter((price >= 1000000:Int32)), count(distinct auction), count(distinct auction) filter((price < 10000:Int32)), count(distinct auction) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct auction) filter((price >= 1000000:Int32))] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [(distinct key: bidder, table id: 1), (distinct key: auction, table id: 2)] StreamExchange Hash([0]) from 1 Fragment 1 @@ -879,9 +879,11 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 3 - Table 0 { columns: [$expr1, count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), count(distinct bidder), count(distinct bidder) filter((price < 10000:Int32)), count(distinct bidder) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct bidder) filter((price >= 1000000:Int32)), count(distinct auction), count(distinct auction) filter((price < 10000:Int32)), count(distinct auction) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct auction) filter((price >= 1000000:Int32))], primary key: [$0 ASC], value indices: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [0] } - Table 3 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [day, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [0] } + Table 0 { columns: [$expr1, count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), count(distinct bidder), count(distinct bidder) filter((price < 10000:Int32)), count(distinct bidder) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct bidder) filter((price >= 1000000:Int32)), count(distinct auction), count(distinct auction) filter((price < 10000:Int32)), count(distinct auction) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct auction) filter((price >= 1000000:Int32))], primary key: [$0 ASC], value indices: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [$expr1, bidder, count_for_agg_call_4, count_for_agg_call_5, count_for_agg_call_6, count_for_agg_call_7], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5], distribution key: [0], read pk prefix len hint: 0 } + Table 2 { columns: [$expr1, auction, count_for_agg_call_8, count_for_agg_call_9, count_for_agg_call_10, count_for_agg_call_11], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5], distribution key: [0], read pk prefix len hint: 0 } + Table 3 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [day, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [0], read pk prefix len hint: 1 } - id: nexmark_q16 before: - create_sources @@ -926,7 +928,7 @@ StreamMaterialize { columns: [channel, day, minute, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], pk_columns: [channel, day], pk_conflict: "no check" } materialized table: 4294967294 StreamAppendOnlyHashAgg { group_key: [channel, $expr1], aggs: [max($expr2), count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), count(distinct bidder), count(distinct bidder) filter((price < 10000:Int32)), count(distinct bidder) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct bidder) filter((price >= 1000000:Int32)), count(distinct auction), count(distinct auction) filter((price < 10000:Int32)), count(distinct auction) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct auction) filter((price >= 1000000:Int32))] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [(distinct key: bidder, table id: 1), (distinct key: auction, table id: 2)] StreamExchange Hash([0, 1]) from 1 Fragment 1 @@ -935,9 +937,11 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 3 - Table 0 { columns: [channel, $expr1, max($expr2), count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), count(distinct bidder), count(distinct bidder) filter((price < 10000:Int32)), count(distinct bidder) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct bidder) filter((price >= 1000000:Int32)), count(distinct auction), count(distinct auction) filter((price < 10000:Int32)), count(distinct auction) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct auction) filter((price >= 1000000:Int32))], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0, 1] } - Table 3 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [channel, day, minute, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0, 1] } + Table 0 { columns: [channel, $expr1, max($expr2), count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), count(distinct bidder), count(distinct bidder) filter((price < 10000:Int32)), count(distinct bidder) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct bidder) filter((price >= 1000000:Int32)), count(distinct auction), count(distinct auction) filter((price < 10000:Int32)), count(distinct auction) filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count(distinct auction) filter((price >= 1000000:Int32))], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 1 { columns: [channel, $expr1, bidder, count_for_agg_call_5, count_for_agg_call_6, count_for_agg_call_7, count_for_agg_call_8], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3, 4, 5, 6], distribution key: [0, 1], read pk prefix len hint: 0 } + Table 2 { columns: [channel, $expr1, auction, count_for_agg_call_9, count_for_agg_call_10, count_for_agg_call_11, count_for_agg_call_12], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3, 4, 5, 6], distribution key: [0, 1], read pk prefix len hint: 0 } + Table 3 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [channel, day, minute, total_bids, rank1_bids, rank2_bids, rank3_bids, total_bidders, rank1_bidders, rank2_bidders, rank3_bidders, total_auctions, rank1_auctions, rank2_auctions, rank3_auctions], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0, 1], read pk prefix len hint: 2 } - id: nexmark_q17 before: - create_sources @@ -976,7 +980,7 @@ materialized table: 4294967294 StreamProject { exprs: [auction, $expr1, count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), min(price), max(price), (sum(price)::Decimal / count(price)) as $expr2, sum(price)] } StreamAppendOnlyHashAgg { group_key: [auction, $expr1], aggs: [count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), min(price), max(price), sum(price), count(price)] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0, 1]) from 1 Fragment 1 @@ -985,9 +989,9 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 1 - Table 0 { columns: [auction, $expr1, count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), min(price), max(price), sum(price), count(price)], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0, 1] } - Table 1 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction, day, total_bids, rank1_bids, rank2_bids, rank3_bids, min_price, max_price, avg_price, sum_price], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0, 1] } + Table 0 { columns: [auction, $expr1, count, count filter((price < 10000:Int32)), count filter((price >= 10000:Int32) AND (price < 1000000:Int32)), count filter((price >= 1000000:Int32)), min(price), max(price), sum(price), count(price)], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 1 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction, day, total_bids, rank1_bids, rank2_bids, rank3_bids, min_price, max_price, avg_price, sum_price], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0, 1], read pk prefix len hint: 2 } - id: nexmark_q18 before: - create_sources @@ -1033,9 +1037,9 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 1 - Table 0 { columns: [auction, bidder, price, channel, url, date_time, extra, _row_id], primary key: [$1 ASC, $0 ASC, $5 DESC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [1, 0] } - Table 1 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction, bidder, price, channel, url, date_time, extra, _row_id], primary key: [$7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [7] } + Table 0 { columns: [auction, bidder, price, channel, url, date_time, extra, _row_id], primary key: [$1 ASC, $0 ASC, $5 DESC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [1, 0], read pk prefix len hint: 2 } + Table 1 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction, bidder, price, channel, url, date_time, extra, _row_id], primary key: [$7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [7], read pk prefix len hint: 1 } - id: nexmark_q19 before: - create_sources @@ -1109,13 +1113,13 @@ StreamSource { source: "auction", columns: ["id", "item_name", "description", "initial_bid", "reserve", "date_time", "expires", "seller", "category", "_row_id"] } source state table: 5 - Table 0 { columns: [auction, bidder, price, channel, url, date_time, _row_id], primary key: [$0 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0] } - Table 1 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [id, item_name, description, initial_bid, reserve, date_time, expires, seller, category, _row_id], primary key: [$0 ASC, $9 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0] } - Table 3 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 5 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction, bidder, price, channel, url, date_timeb, item_name, description, initial_bid, reserve, date_timea, expires, seller, category, _row_id, _row_id#1], primary key: [$14 ASC, $15 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], distribution key: [0] } + Table 0 { columns: [auction, bidder, price, channel, url, date_time, _row_id], primary key: [$0 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [id, item_name, description, initial_bid, reserve, date_time, expires, seller, category, _row_id], primary key: [$0 ASC, $9 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 5 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction, bidder, price, channel, url, date_timeb, item_name, description, initial_bid, reserve, date_timea, expires, seller, category, _row_id, _row_id#1], primary key: [$14 ASC, $15 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], distribution key: [0], read pk prefix len hint: 3 } - id: nexmark_q21 before: - create_sources @@ -1166,8 +1170,8 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 0 - Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction, bidder, price, channel, dir1, dir2, dir3, _row_id], primary key: [$7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [7] } + Table 0 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction, bidder, price, channel, dir1, dir2, dir3, _row_id], primary key: [$7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [7], read pk prefix len hint: 1 } - id: nexmark_q101 before: - create_sources @@ -1218,7 +1222,7 @@ StreamExchange Hash([0]) from 1 StreamProject { exprs: [auction, max(price)] } StreamAppendOnlyHashAgg { group_key: [auction], aggs: [max(price), count] } - result table: 5, state tables: [] + result table: 5, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 2 Fragment 1 @@ -1232,14 +1236,14 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 6 - Table 0 { columns: [id, item_name, _row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 1 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [auction, max(price)], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 3 { columns: [auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 5 { columns: [auction, max(price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 6 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction_id, auction_item_name, current_highest_bid, _row_id, auction], primary key: [$3 ASC, $4 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0] } + Table 0 { columns: [id, item_name, _row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [auction, max(price)], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 5 { columns: [auction, max(price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction_id, auction_item_name, current_highest_bid, _row_id, auction], primary key: [$3 ASC, $4 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0], read pk prefix len hint: 3 } - id: nexmark_q102 before: - create_sources @@ -1310,7 +1314,7 @@ left table: 0, right table 1 StreamProject { exprs: [id, item_name, count(auction)] } StreamAppendOnlyHashAgg { group_key: [id, item_name], aggs: [count(auction), count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamAppendOnlyHashJoin { type: Inner, predicate: id = auction, output: [id, item_name, auction, _row_id, _row_id] } left table: 3, right table 5, left degree table: 4, right degree table: 6, StreamExchange Hash([0]) from 1 @@ -1336,30 +1340,30 @@ Fragment 4 StreamProject { exprs: [(sum0(count) / count(auction)) as $expr1] } StreamGlobalSimpleAgg { aggs: [sum0(count), count(auction), count] } - result table: 9, state tables: [] + result table: 9, state tables: [], distinct tables: [] StreamExchange Single from 5 Fragment 5 StreamAppendOnlyHashAgg { group_key: [auction], aggs: [count] } - result table: 10, state tables: [] + result table: 10, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 6 Fragment 6 StreamProject { exprs: [auction, _row_id] } StreamExchange Hash([1]) from 3 - Table 0 { columns: [id, item_name, count(auction)], primary key: [$2 ASC, $0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 1 { columns: [$expr1], primary key: [], value indices: [0], distribution key: [] } - Table 2 { columns: [id, item_name, count(auction), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0] } - Table 3 { columns: [id, item_name, _row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 4 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 5 { columns: [auction, _row_id], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0] } - Table 6 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 7 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 8 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 9 { columns: [sum0(count), count(auction), count], primary key: [], value indices: [0, 1, 2], distribution key: [] } - Table 10 { columns: [auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [auction_id, auction_item_name, bid_count], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0] } + Table 0 { columns: [id, item_name, count(auction)], primary key: [$2 ASC, $0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 0 } + Table 1 { columns: [$expr1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } + Table 2 { columns: [id, item_name, count(auction), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0], read pk prefix len hint: 2 } + Table 3 { columns: [id, item_name, _row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [auction, _row_id], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 8 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 9 { columns: [sum0(count), count(auction), count], primary key: [], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 0 } + Table 10 { columns: [auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [auction_id, auction_item_name, bid_count], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 2 } - id: nexmark_q103 before: - create_sources @@ -1410,7 +1414,7 @@ StreamProject { exprs: [auction] } StreamFilter { predicate: (count >= 20:Int32) } StreamAppendOnlyHashAgg { group_key: [auction], aggs: [count] } - result table: 5, state tables: [] + result table: 5, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 2 Fragment 1 @@ -1424,14 +1428,14 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 6 - Table 0 { columns: [id, item_name, _row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 1 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [auction], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 3 { columns: [auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 5 { columns: [auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 6 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction_id, auction_item_name, _row_id], primary key: [$2 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [0] } + Table 0 { columns: [id, item_name, _row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [auction], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 5 { columns: [auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction_id, auction_item_name, _row_id], primary key: [$2 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 2 } - id: nexmark_q104 before: - create_sources @@ -1482,7 +1486,7 @@ StreamProject { exprs: [auction] } StreamFilter { predicate: (count < 20:Int32) } StreamAppendOnlyHashAgg { group_key: [auction], aggs: [count] } - result table: 5, state tables: [] + result table: 5, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 2 Fragment 1 @@ -1496,14 +1500,14 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 6 - Table 0 { columns: [id, item_name, _row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 1 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 2 { columns: [auction], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 3 { columns: [auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 5 { columns: [auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 6 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction_id, auction_item_name, _row_id], primary key: [$2 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [0] } + Table 0 { columns: [id, item_name, _row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [auction], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [auction, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 5 { columns: [auction, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction_id, auction_item_name, _row_id], primary key: [$2 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 2 } - id: nexmark_q105 before: - create_sources @@ -1565,7 +1569,7 @@ StreamProject { exprs: [id, item_name, count(auction), Vnode(id) as $expr1] } StreamProject { exprs: [id, item_name, count(auction)] } StreamAppendOnlyHashAgg { group_key: [id, item_name], aggs: [count(auction), count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamAppendOnlyHashJoin { type: Inner, predicate: id = auction, output: [id, item_name, auction, _row_id, _row_id] } left table: 3, right table 5, left degree table: 4, right degree table: 6, StreamExchange Hash([0]) from 2 @@ -1583,16 +1587,16 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 8 - Table 0 { columns: [id, item_name, count(auction), $expr1], primary key: [$2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [] } - Table 1 { columns: [id, item_name, count(auction), $expr1], primary key: [$3 ASC, $2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [0], vnode column idx: 3 } - Table 2 { columns: [id, item_name, count(auction), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0] } - Table 3 { columns: [id, item_name, _row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 4 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 5 { columns: [auction, _row_id], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0] } - Table 6 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 7 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 8 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [auction_id, auction_item_name, bid_count], primary key: [$2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [] } + Table 0 { columns: [id, item_name, count(auction), $expr1], primary key: [$2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [id, item_name, count(auction), $expr1], primary key: [$3 ASC, $2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1, vnode column idx: 3 } + Table 2 { columns: [id, item_name, count(auction), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0], read pk prefix len hint: 2 } + Table 3 { columns: [id, item_name, _row_id], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [auction, _row_id], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 8 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [auction_id, auction_item_name, bid_count], primary key: [$2 DESC, $0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 2 } - id: nexmark_q106 before: - create_sources @@ -1654,16 +1658,16 @@ materialized table: 4294967294 StreamProject { exprs: [min(min(max(price)))] } StreamGlobalSimpleAgg { aggs: [min(min(max(price))), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Single from 1 Fragment 1 StreamHashAgg { group_key: [$expr1], aggs: [min(max(price)), count] } - result table: 3, state tables: [2] + result table: 3, state tables: [2], distinct tables: [] StreamProject { exprs: [id, max(price), Vnode(id) as $expr1] } StreamProject { exprs: [id, max(price)] } StreamAppendOnlyHashAgg { group_key: [id], aggs: [max(price), count] } - result table: 4, state tables: [] + result table: 4, state tables: [], distinct tables: [] StreamProject { exprs: [id, price, _row_id, _row_id] } StreamFilter { predicate: (date_time >= date_time) AND (date_time <= expires) } StreamAppendOnlyHashJoin { type: Inner, predicate: id = auction, output: all } @@ -1683,15 +1687,15 @@ StreamSource { source: "bid", columns: ["auction", "bidder", "price", "channel", "url", "date_time", "extra", "_row_id"] } source state table: 10 - Table 0 { columns: [min(max(price)), $expr1], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [] } - Table 1 { columns: [min(min(max(price))), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 2 { columns: [$expr1, max(price), id], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [1, 2], distribution key: [2], vnode column idx: 0 } - Table 3 { columns: [$expr1, min(max(price)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [], vnode column idx: 0 } - Table 4 { columns: [id, max(price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 5 { columns: [id, date_time, expires, _row_id], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 6 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 7 { columns: [auction, price, date_time, _row_id], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 8 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 9 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 10 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [min_final], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [min(max(price)), $expr1], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [min(min(max(price))), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 2 { columns: [$expr1, max(price), id], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [1, 2], distribution key: [2], read pk prefix len hint: 1, vnode column idx: 0 } + Table 3 { columns: [$expr1, min(max(price)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [], read pk prefix len hint: 1, vnode column idx: 0 } + Table 4 { columns: [id, max(price), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [id, date_time, expires, _row_id], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [id, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [auction, price, date_time, _row_id], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 8 { columns: [auction, _row_id, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 10 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [min_final], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } diff --git a/src/frontend/planner_test/tests/testdata/stream_dist_agg.yaml b/src/frontend/planner_test/tests/testdata/stream_dist_agg.yaml index cca0a2fa15ed4..9b316279386cb 100644 --- a/src/frontend/planner_test/tests/testdata/stream_dist_agg.yaml +++ b/src/frontend/planner_test/tests/testdata/stream_dist_agg.yaml @@ -26,14 +26,14 @@ materialized table: 4294967294 StreamProject { exprs: [max(s.v)] } StreamGlobalSimpleAgg { aggs: [max(s.v), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] Chain { table: s, columns: [s.v, s.o, s.t._row_id], pk: [s.t._row_id], dist: Single } Upstream BatchPlanNode - Table 0 { columns: [s_v, s_t__row_id], primary key: [$0 DESC, $1 ASC], value indices: [0, 1], distribution key: [] } - Table 1 { columns: [max(s_v), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [s_v, s_t__row_id], primary key: [$0 DESC, $1 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [max(s_v), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: sum_on_single before: - create_tables @@ -54,13 +54,13 @@ materialized table: 4294967294 StreamProject { exprs: [sum(s.v)] } StreamGlobalSimpleAgg { aggs: [sum(s.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] Chain { table: s, columns: [s.v, s.o, s.t._row_id], pk: [s.t._row_id], dist: Single } Upstream BatchPlanNode - Table 0 { columns: [sum(s_v), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [sum(s_v), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: cnt_on_single before: - create_tables @@ -81,13 +81,13 @@ materialized table: 4294967294 StreamProject { exprs: [count(s.v)] } StreamGlobalSimpleAgg { aggs: [count(s.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] Chain { table: s, columns: [s.v, s.o, s.t._row_id], pk: [s.t._row_id], dist: Single } Upstream BatchPlanNode - Table 0 { columns: [count(s_v), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [count(s_v), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: string_agg_on_single before: - create_tables @@ -110,15 +110,15 @@ materialized table: 4294967294 StreamProject { exprs: [string_agg(s.s, ',':Varchar order_by(s.v ASC))] } StreamGlobalSimpleAgg { aggs: [string_agg(s.s, ',':Varchar order_by(s.v ASC)), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamProject { exprs: [s.s, ',':Varchar, s.v, s.t._row_id] } Chain { table: s, columns: [s.v, s.s, s.o, s.t._row_id], pk: [s.t._row_id], dist: Single } Upstream BatchPlanNode - Table 0 { columns: [s_v, s_t__row_id, s_s, ',':Varchar], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [] } - Table 1 { columns: [string_agg(s_s, ',':Varchar order_by(s_v ASC)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [s_v, s_t__row_id, s_s, ',':Varchar], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [string_agg(s_s, ',':Varchar order_by(s_v ASC)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: extreme_on_T before: - create_tables @@ -143,22 +143,22 @@ materialized table: 4294967294 StreamProject { exprs: [max(max(t.v))] } StreamGlobalSimpleAgg { aggs: [max(max(t.v)), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Single from 1 Fragment 1 StreamHashAgg { group_key: [$expr1], aggs: [max(t.v), count] } - result table: 3, state tables: [2] + result table: 3, state tables: [2], distinct tables: [] StreamProject { exprs: [t.v, t._row_id, Vnode(t._row_id) as $expr1] } Chain { table: t, columns: [t.v, t._row_id], pk: [t._row_id], dist: UpstreamHashShard(t._row_id) } Upstream BatchPlanNode - Table 0 { columns: [max(t_v), $expr1], primary key: [$0 DESC, $1 ASC], value indices: [0, 1], distribution key: [] } - Table 1 { columns: [max(max(t_v)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 2 { columns: [$expr1, t_v, t__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [2], vnode column idx: 0 } - Table 3 { columns: [$expr1, max(t_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [], vnode column idx: 0 } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [max(t_v), $expr1], primary key: [$0 DESC, $1 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [max(max(t_v)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 2 { columns: [$expr1, t_v, t__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [2], read pk prefix len hint: 1, vnode column idx: 0 } + Table 3 { columns: [$expr1, max(t_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [], read pk prefix len hint: 1, vnode column idx: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: extreme_on_AO before: - create_tables @@ -177,7 +177,7 @@ materialized table: 4294967294 StreamProject { exprs: [max(max(ao.v))] } StreamAppendOnlyGlobalSimpleAgg { aggs: [max(max(ao.v)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -186,8 +186,8 @@ Upstream BatchPlanNode - Table 0 { columns: [max(max(ao_v)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [max(max(ao_v)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: sum_on_T before: - create_tables @@ -211,7 +211,7 @@ materialized table: 4294967294 StreamProject { exprs: [sum(sum(t.v))] } StreamGlobalSimpleAgg { aggs: [sum(sum(t.v)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -220,8 +220,8 @@ Upstream BatchPlanNode - Table 0 { columns: [sum(sum(t_v)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [sum(sum(t_v)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: sum_on_AO before: - create_tables @@ -240,7 +240,7 @@ materialized table: 4294967294 StreamProject { exprs: [sum(sum(ao.v))] } StreamAppendOnlyGlobalSimpleAgg { aggs: [sum(sum(ao.v)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -249,8 +249,8 @@ Upstream BatchPlanNode - Table 0 { columns: [sum(sum(ao_v)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [sum(sum(ao_v)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: cnt_on_T before: - create_tables @@ -274,7 +274,7 @@ materialized table: 4294967294 StreamProject { exprs: [sum0(count(t.v))] } StreamGlobalSimpleAgg { aggs: [sum0(count(t.v)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -283,8 +283,8 @@ Upstream BatchPlanNode - Table 0 { columns: [sum0(count(t_v)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [sum0(count(t_v)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: cnt_on_AO before: - create_tables @@ -303,7 +303,7 @@ materialized table: 4294967294 StreamProject { exprs: [sum0(count(ao.v))] } StreamAppendOnlyGlobalSimpleAgg { aggs: [sum0(count(ao.v)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -312,8 +312,8 @@ Upstream BatchPlanNode - Table 0 { columns: [sum0(count(ao_v)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [sum0(count(ao_v)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: string_agg_on_T before: - create_tables @@ -337,7 +337,7 @@ materialized table: 4294967294 StreamProject { exprs: [string_agg(t.s, ',':Varchar order_by(t.o ASC))] } StreamGlobalSimpleAgg { aggs: [string_agg(t.s, ',':Varchar order_by(t.o ASC)), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -346,9 +346,9 @@ Upstream BatchPlanNode - Table 0 { columns: [t_o, t__row_id, t_s, ',':Varchar], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [] } - Table 1 { columns: [string_agg(t_s, ',':Varchar order_by(t_o ASC)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [t_o, t__row_id, t_s, ',':Varchar], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [string_agg(t_s, ',':Varchar order_by(t_o ASC)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: string_agg_on_AO before: - create_tables @@ -367,7 +367,7 @@ materialized table: 4294967294 StreamProject { exprs: [string_agg(ao.s, ',':Varchar order_by(ao.o ASC))] } StreamAppendOnlyGlobalSimpleAgg { aggs: [string_agg(ao.s, ',':Varchar order_by(ao.o ASC)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -376,8 +376,8 @@ Upstream BatchPlanNode - Table 0 { columns: [string_agg(ao_s, ',':Varchar order_by(ao_o ASC)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [string_agg(ao_s, ',':Varchar order_by(ao_o ASC)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: extreme_count_on_T before: - create_tables @@ -402,22 +402,22 @@ materialized table: 4294967294 StreamProject { exprs: [max(max(t.v)), sum0(count(t.v))] } StreamGlobalSimpleAgg { aggs: [max(max(t.v)), sum0(count(t.v)), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Single from 1 Fragment 1 StreamHashAgg { group_key: [$expr1], aggs: [max(t.v), count(t.v), count] } - result table: 3, state tables: [2] + result table: 3, state tables: [2], distinct tables: [] StreamProject { exprs: [t.v, t._row_id, Vnode(t._row_id) as $expr1] } Chain { table: t, columns: [t.v, t._row_id], pk: [t._row_id], dist: UpstreamHashShard(t._row_id) } Upstream BatchPlanNode - Table 0 { columns: [max(t_v), $expr1], primary key: [$0 DESC, $1 ASC], value indices: [0, 1], distribution key: [] } - Table 1 { columns: [max(max(t_v)), sum0(count(t_v)), count], primary key: [], value indices: [0, 1, 2], distribution key: [] } - Table 2 { columns: [$expr1, t_v, t__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [2], vnode column idx: 0 } - Table 3 { columns: [$expr1, max(t_v), count(t_v), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [], vnode column idx: 0 } - Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [] } + Table 0 { columns: [max(t_v), $expr1], primary key: [$0 DESC, $1 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [max(max(t_v)), sum0(count(t_v)), count], primary key: [], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 0 } + Table 2 { columns: [$expr1, t_v, t__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [2], read pk prefix len hint: 1, vnode column idx: 0 } + Table 3 { columns: [$expr1, max(t_v), count(t_v), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [], read pk prefix len hint: 1, vnode column idx: 0 } + Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } - id: extreme_count_on_AO before: - create_tables @@ -436,7 +436,7 @@ materialized table: 4294967294 StreamProject { exprs: [max(max(ao.v)), sum0(count(ao.v))] } StreamAppendOnlyGlobalSimpleAgg { aggs: [max(max(ao.v)), sum0(count(ao.v)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -445,8 +445,8 @@ Upstream BatchPlanNode - Table 0 { columns: [max(max(ao_v)), sum0(count(ao_v)), count], primary key: [], value indices: [0, 1, 2], distribution key: [] } - Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [] } + Table 0 { columns: [max(max(ao_v)), sum0(count(ao_v)), count], primary key: [], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } - id: count_string_agg_on_T before: - create_tables @@ -470,7 +470,7 @@ materialized table: 4294967294 StreamProject { exprs: [count(t.v), string_agg(t.s, ',':Varchar order_by(t.o ASC))] } StreamGlobalSimpleAgg { aggs: [count(t.v), string_agg(t.s, ',':Varchar order_by(t.o ASC)), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -479,9 +479,9 @@ Upstream BatchPlanNode - Table 0 { columns: [t_o, t__row_id, t_s, ',':Varchar], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [] } - Table 1 { columns: [count(t_v), string_agg(t_s, ',':Varchar order_by(t_o ASC)), count], primary key: [], value indices: [0, 1, 2], distribution key: [] } - Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [] } + Table 0 { columns: [t_o, t__row_id, t_s, ',':Varchar], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [count(t_v), string_agg(t_s, ',':Varchar order_by(t_o ASC)), count], primary key: [], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } - id: count_string_agg_on_AO before: - create_tables @@ -500,7 +500,7 @@ materialized table: 4294967294 StreamProject { exprs: [count(ao.v), string_agg(ao.s, ',':Varchar order_by(ao.o ASC))] } StreamAppendOnlyGlobalSimpleAgg { aggs: [count(ao.v), string_agg(ao.s, ',':Varchar order_by(ao.o ASC)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -509,8 +509,8 @@ Upstream BatchPlanNode - Table 0 { columns: [count(ao_v), string_agg(ao_s, ',':Varchar order_by(ao_o ASC)), count], primary key: [], value indices: [0, 1, 2], distribution key: [] } - Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [] } + Table 0 { columns: [count(ao_v), string_agg(ao_s, ',':Varchar order_by(ao_o ASC)), count], primary key: [], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } - id: extreme_string_agg_on_T before: - create_tables @@ -534,7 +534,7 @@ materialized table: 4294967294 StreamProject { exprs: [max(t.v), string_agg(t.s, ',':Varchar order_by(t.o ASC))] } StreamGlobalSimpleAgg { aggs: [max(t.v), string_agg(t.s, ',':Varchar order_by(t.o ASC)), count] } - result table: 2, state tables: [0, 1] + result table: 2, state tables: [0, 1], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -543,10 +543,10 @@ Upstream BatchPlanNode - Table 0 { columns: [t_v, t__row_id], primary key: [$0 DESC, $1 ASC], value indices: [0, 1], distribution key: [] } - Table 1 { columns: [t_o, t__row_id, t_s, ',':Varchar], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [] } - Table 2 { columns: [max(t_v), string_agg(t_s, ',':Varchar order_by(t_o ASC)), count], primary key: [], value indices: [0, 1, 2], distribution key: [] } - Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [] } + Table 0 { columns: [t_v, t__row_id], primary key: [$0 DESC, $1 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [t_o, t__row_id, t_s, ',':Varchar], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3], distribution key: [], read pk prefix len hint: 0 } + Table 2 { columns: [max(t_v), string_agg(t_s, ',':Varchar order_by(t_o ASC)), count], primary key: [], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } - id: extreme_string_agg_on_AO before: - create_tables @@ -565,7 +565,7 @@ materialized table: 4294967294 StreamProject { exprs: [max(ao.v), string_agg(ao.s, ',':Varchar order_by(ao.o ASC))] } StreamAppendOnlyGlobalSimpleAgg { aggs: [max(ao.v), string_agg(ao.s, ',':Varchar order_by(ao.o ASC)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -574,8 +574,8 @@ Upstream BatchPlanNode - Table 0 { columns: [max(ao_v), string_agg(ao_s, ',':Varchar order_by(ao_o ASC)), count], primary key: [], value indices: [0, 1, 2], distribution key: [] } - Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [] } + Table 0 { columns: [max(ao_v), string_agg(ao_s, ',':Varchar order_by(ao_o ASC)), count], primary key: [], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [a1, a2], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } - id: extreme_on_T_by_k before: - create_tables @@ -599,7 +599,7 @@ materialized table: 4294967294 StreamProject { exprs: [max(t.v), t.k] } StreamHashAgg { group_key: [t.k], aggs: [max(t.v), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -607,9 +607,9 @@ Upstream BatchPlanNode - Table 0 { columns: [t_k, t_v, t__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0] } - Table 1 { columns: [t_k, max(t_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, t.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [t_k, t_v, t__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [t_k, max(t_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, t.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: extreme_on_Tk_by_k before: - create_tables @@ -631,14 +631,14 @@ materialized table: 4294967294 StreamProject { exprs: [max(tk.v), tk.k] } StreamHashAgg { group_key: [tk.k], aggs: [max(tk.v), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] Chain { table: tk, columns: [tk.k, tk.v, tk.t._row_id], pk: [tk.t._row_id], dist: UpstreamHashShard(tk.k) } Upstream BatchPlanNode - Table 0 { columns: [tk_k, tk_v, tk_t__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0] } - Table 1 { columns: [tk_k, max(tk_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, tk.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [tk_k, tk_v, tk_t__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [tk_k, max(tk_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, tk.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: extreme_on_S_by_k before: - create_tables @@ -662,7 +662,7 @@ materialized table: 4294967294 StreamProject { exprs: [max(s.v), s.k] } StreamHashAgg { group_key: [s.k], aggs: [max(s.v), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -670,9 +670,9 @@ Upstream BatchPlanNode - Table 0 { columns: [s_k, s_v, s_t__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0] } - Table 1 { columns: [s_k, max(s_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, s.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [s_k, s_v, s_t__row_id], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [s_k, max(s_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, s.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: extreme_on_AO_by_k before: - create_tables @@ -690,7 +690,7 @@ materialized table: 4294967294 StreamProject { exprs: [max(ao.v), ao.k] } StreamAppendOnlyHashAgg { group_key: [ao.k], aggs: [max(ao.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -698,8 +698,8 @@ Upstream BatchPlanNode - Table 0 { columns: [ao_k, max(ao_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, ao.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [ao_k, max(ao_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, ao.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: sum_on_T_by_k before: - create_tables @@ -723,7 +723,7 @@ materialized table: 4294967294 StreamProject { exprs: [sum(t.v), t.k] } StreamHashAgg { group_key: [t.k], aggs: [sum(t.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -731,8 +731,8 @@ Upstream BatchPlanNode - Table 0 { columns: [t_k, sum(t_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, t.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [t_k, sum(t_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, t.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: sum_on_Tk_by_k before: - create_tables @@ -754,13 +754,13 @@ materialized table: 4294967294 StreamProject { exprs: [sum(tk.v), tk.k] } StreamHashAgg { group_key: [tk.k], aggs: [sum(tk.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] Chain { table: tk, columns: [tk.k, tk.v, tk.t._row_id], pk: [tk.t._row_id], dist: UpstreamHashShard(tk.k) } Upstream BatchPlanNode - Table 0 { columns: [tk_k, sum(tk_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, tk.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [tk_k, sum(tk_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, tk.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: sum_on_S_by_k before: - create_tables @@ -784,7 +784,7 @@ materialized table: 4294967294 StreamProject { exprs: [sum(s.v), s.k] } StreamHashAgg { group_key: [s.k], aggs: [sum(s.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -792,8 +792,8 @@ Upstream BatchPlanNode - Table 0 { columns: [s_k, sum(s_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, s.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [s_k, sum(s_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, s.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: sum_on_AO_by_k before: - create_tables @@ -811,7 +811,7 @@ materialized table: 4294967294 StreamProject { exprs: [sum(ao.v), ao.k] } StreamAppendOnlyHashAgg { group_key: [ao.k], aggs: [sum(ao.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -819,8 +819,8 @@ Upstream BatchPlanNode - Table 0 { columns: [ao_k, sum(ao_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, ao.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [ao_k, sum(ao_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, ao.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: cnt_on_T_by_k before: - create_tables @@ -844,7 +844,7 @@ materialized table: 4294967294 StreamProject { exprs: [count(t.v), t.k] } StreamHashAgg { group_key: [t.k], aggs: [count(t.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -852,8 +852,8 @@ Upstream BatchPlanNode - Table 0 { columns: [t_k, count(t_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, t.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [t_k, count(t_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, t.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: cnt_on_Tk_by_k before: - create_tables @@ -875,13 +875,13 @@ materialized table: 4294967294 StreamProject { exprs: [count(tk.v), tk.k] } StreamHashAgg { group_key: [tk.k], aggs: [count(tk.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] Chain { table: tk, columns: [tk.k, tk.v, tk.t._row_id], pk: [tk.t._row_id], dist: UpstreamHashShard(tk.k) } Upstream BatchPlanNode - Table 0 { columns: [tk_k, count(tk_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, tk.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [tk_k, count(tk_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, tk.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: cnt_on_S_by_k before: - create_tables @@ -905,7 +905,7 @@ materialized table: 4294967294 StreamProject { exprs: [count(s.v), s.k] } StreamHashAgg { group_key: [s.k], aggs: [count(s.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -913,8 +913,8 @@ Upstream BatchPlanNode - Table 0 { columns: [s_k, count(s_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, s.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [s_k, count(s_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, s.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: cnt_on_AO_by_k before: - create_tables @@ -932,7 +932,7 @@ materialized table: 4294967294 StreamProject { exprs: [count(ao.v), ao.k] } StreamAppendOnlyHashAgg { group_key: [ao.k], aggs: [count(ao.v), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -940,8 +940,8 @@ Upstream BatchPlanNode - Table 0 { columns: [ao_k, count(ao_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, ao.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [ao_k, count(ao_v), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, ao.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: string_agg_on_T_by_k before: - create_tables @@ -967,7 +967,7 @@ materialized table: 4294967294 StreamProject { exprs: [string_agg(t.s, ',':Varchar order_by(t.o ASC)), t.k] } StreamHashAgg { group_key: [t.k], aggs: [string_agg(t.s, ',':Varchar order_by(t.o ASC)), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -976,9 +976,9 @@ Upstream BatchPlanNode - Table 0 { columns: [t_k, t_o, t__row_id, t_s, ',':Varchar], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [1, 2, 3, 4], distribution key: [0] } - Table 1 { columns: [t_k, string_agg(t_s, ',':Varchar order_by(t_o ASC)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, t.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [t_k, t_o, t__row_id, t_s, ',':Varchar], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [1, 2, 3, 4], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [t_k, string_agg(t_s, ',':Varchar order_by(t_o ASC)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, t.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: string_agg_on_Tk_by_k before: - create_tables @@ -1002,15 +1002,15 @@ materialized table: 4294967294 StreamProject { exprs: [string_agg(tk.s, ',':Varchar order_by(tk.o ASC)), tk.k] } StreamHashAgg { group_key: [tk.k], aggs: [string_agg(tk.s, ',':Varchar order_by(tk.o ASC)), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamProject { exprs: [tk.k, tk.s, ',':Varchar, tk.o, tk.t._row_id] } Chain { table: tk, columns: [tk.k, tk.o, tk.s, tk.t._row_id], pk: [tk.t._row_id], dist: UpstreamHashShard(tk.k) } Upstream BatchPlanNode - Table 0 { columns: [tk_k, tk_o, tk_t__row_id, tk_s, ',':Varchar], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [1, 2, 3, 4], distribution key: [0] } - Table 1 { columns: [tk_k, string_agg(tk_s, ',':Varchar order_by(tk_o ASC)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, tk.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [tk_k, tk_o, tk_t__row_id, tk_s, ',':Varchar], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [1, 2, 3, 4], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [tk_k, string_agg(tk_s, ',':Varchar order_by(tk_o ASC)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, tk.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: string_agg_on_S_by_k before: - create_tables @@ -1036,7 +1036,7 @@ materialized table: 4294967294 StreamProject { exprs: [string_agg(s.s, ',':Varchar order_by(s.o ASC)), s.k] } StreamHashAgg { group_key: [s.k], aggs: [string_agg(s.s, ',':Varchar order_by(s.o ASC)), count] } - result table: 1, state tables: [0] + result table: 1, state tables: [0], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -1045,9 +1045,9 @@ Upstream BatchPlanNode - Table 0 { columns: [s_k, s_o, s_t__row_id, s_s, ',':Varchar], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [1, 2, 3, 4], distribution key: [0] } - Table 1 { columns: [s_k, string_agg(s_s, ',':Varchar order_by(s_o ASC)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, s.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [s_k, s_o, s_t__row_id, s_s, ',':Varchar], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [1, 2, 3, 4], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [s_k, string_agg(s_s, ',':Varchar order_by(s_o ASC)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, s.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - id: string_agg_on_AO_by_k before: - create_tables @@ -1066,7 +1066,7 @@ materialized table: 4294967294 StreamProject { exprs: [string_agg(ao.s, ',':Varchar order_by(ao.o ASC)), ao.k] } StreamAppendOnlyHashAgg { group_key: [ao.k], aggs: [string_agg(ao.s, ',':Varchar order_by(ao.o ASC)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -1075,5 +1075,5 @@ Upstream BatchPlanNode - Table 0 { columns: [ao_k, string_agg(ao_s, ',':Varchar order_by(ao_o ASC)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [a1, ao.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1] } + Table 0 { columns: [ao_k, string_agg(ao_s, ',':Varchar order_by(ao_o ASC)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [a1, ao.k], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } diff --git a/src/frontend/planner_test/tests/testdata/temporal_filter.yaml b/src/frontend/planner_test/tests/testdata/temporal_filter.yaml index c58464baf4873..d9827629eff4d 100644 --- a/src/frontend/planner_test/tests/testdata/temporal_filter.yaml +++ b/src/frontend/planner_test/tests/testdata/temporal_filter.yaml @@ -56,3 +56,34 @@ └─StreamExchange { dist: Broadcast } └─StreamProject { exprs: [(AtTimeZone((AtTimeZone(now, 'UTC':Varchar) - '00:00:00':Interval), 'UTC':Varchar) - '01:00:00':Interval) as $expr2], output_watermarks: [$expr2] } └─StreamNow { output: [now] } + stream_dist_plan: | + Fragment 0 + StreamMaterialize { columns: [ts, t1._row_id(hidden)], pk_columns: [t1._row_id], pk_conflict: "no check" } + materialized table: 4294967294 + StreamDynamicFilter { predicate: (t1.ts < $expr2), output: [t1.ts, t1._row_id] } + left table: 0, right table 1 + StreamDynamicFilter { predicate: (t1.ts >= $expr1), output_watermarks: [t1.ts], output: [t1.ts, t1._row_id] } + left table: 2, right table 3 + Chain { table: t1, columns: [t1.ts, t1._row_id], pk: [t1._row_id], dist: UpstreamHashShard(t1._row_id) } + Upstream + BatchPlanNode + StreamExchange Broadcast from 1 + StreamExchange Broadcast from 2 + + Fragment 1 + StreamProject { exprs: [(AtTimeZone((AtTimeZone(now, 'UTC':Varchar) - '00:00:00':Interval), 'UTC':Varchar) - '02:00:00':Interval) as $expr1], output_watermarks: [$expr1] } + StreamNow { output: [now] } + state table: 4 + + Fragment 2 + StreamProject { exprs: [(AtTimeZone((AtTimeZone(now, 'UTC':Varchar) - '00:00:00':Interval), 'UTC':Varchar) - '01:00:00':Interval) as $expr2], output_watermarks: [$expr2] } + StreamNow { output: [now] } + state table: 5 + + Table 0 { columns: [t1_ts, t1__row_id], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 0 } + Table 1 { columns: [$expr2], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } + Table 2 { columns: [t1_ts, t1__row_id], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 0 } + Table 3 { columns: [$expr1], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } + Table 4 { columns: [now], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } + Table 5 { columns: [now], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [ts, t1._row_id], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } diff --git a/src/frontend/planner_test/tests/testdata/tpch.yaml b/src/frontend/planner_test/tests/testdata/tpch.yaml index 6374c3cbe8341..296f3253b3986 100644 --- a/src/frontend/planner_test/tests/testdata/tpch.yaml +++ b/src/frontend/planner_test/tests/testdata/tpch.yaml @@ -152,7 +152,7 @@ materialized table: 4294967294 StreamProject { exprs: [lineitem.l_returnflag, lineitem.l_linestatus, sum(lineitem.l_quantity), sum(lineitem.l_extendedprice), sum($expr1), sum($expr2), RoundDigit((sum(lineitem.l_quantity) / count(lineitem.l_quantity)), 4:Int32) as $expr3, RoundDigit((sum(lineitem.l_extendedprice) / count(lineitem.l_extendedprice)), 4:Int32) as $expr4, RoundDigit((sum(lineitem.l_discount) / count(lineitem.l_discount)), 4:Int32) as $expr5, count] } StreamHashAgg { group_key: [lineitem.l_returnflag, lineitem.l_linestatus], aggs: [sum(lineitem.l_quantity), sum(lineitem.l_extendedprice), sum($expr1), sum($expr2), count(lineitem.l_quantity), count(lineitem.l_extendedprice), sum(lineitem.l_discount), count(lineitem.l_discount), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0, 1]) from 1 Fragment 1 @@ -162,8 +162,8 @@ Upstream BatchPlanNode - Table 0 { columns: [lineitem_l_returnflag, lineitem_l_linestatus, sum(lineitem_l_quantity), sum(lineitem_l_extendedprice), sum($expr1), sum($expr2), count(lineitem_l_quantity), count(lineitem_l_extendedprice), sum(lineitem_l_discount), count(lineitem_l_discount), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5, 6, 7, 8, 9, 10], distribution key: [0, 1] } - Table 4294967294 { columns: [l_returnflag, l_linestatus, sum_qty, sum_base_price, sum_disc_price, sum_charge, avg_qty, avg_price, avg_disc, count_order], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0, 1] } + Table 0 { columns: [lineitem_l_returnflag, lineitem_l_linestatus, sum(lineitem_l_quantity), sum(lineitem_l_extendedprice), sum($expr1), sum($expr2), count(lineitem_l_quantity), count(lineitem_l_extendedprice), sum(lineitem_l_discount), count(lineitem_l_discount), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3, 4, 5, 6, 7, 8, 9, 10], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 4294967294 { columns: [l_returnflag, l_linestatus, sum_qty, sum_base_price, sum_disc_price, sum_charge, avg_qty, avg_price, avg_disc, count_order], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0, 1], read pk prefix len hint: 2 } - id: tpch_q2 before: - create_tables @@ -375,7 +375,7 @@ StreamExchange Hash([0]) from 3 StreamProject { exprs: [part.p_partkey, min(partsupp.ps_supplycost)] } StreamHashAgg { group_key: [part.p_partkey], aggs: [min(partsupp.ps_supplycost), count] } - result table: 23, state tables: [22] + result table: 23, state tables: [22], distinct tables: [] StreamHashJoin { type: LeftOuter, predicate: part.p_partkey IS NOT DISTINCT FROM partsupp.ps_partkey, output: [part.p_partkey, partsupp.ps_supplycost, partsupp.ps_partkey, partsupp.ps_suppkey, supplier.s_suppkey, nation.n_nationkey, supplier.s_nationkey, region.r_regionkey, nation.n_regionkey] } left table: 24, right table 26, left degree table: 25, right degree table: 27, StreamExchange Hash([0]) from 10 @@ -424,7 +424,7 @@ Fragment 10 StreamProject { exprs: [part.p_partkey] } StreamHashAgg { group_key: [part.p_partkey], aggs: [count] } - result table: 28, state tables: [] + result table: 28, state tables: [], distinct tables: [] StreamProject { exprs: [part.p_partkey] } StreamFilter { predicate: (part.p_size = 4:Int32) AND Like(part.p_type, '%TIN':Varchar) } Chain { table: part, columns: [part.p_partkey, part.p_type, part.p_size], pk: [part.p_partkey], dist: UpstreamHashShard(part.p_partkey) } @@ -479,48 +479,48 @@ Upstream BatchPlanNode - Table 0 { columns: [supplier_s_acctbal, supplier_s_name, nation_n_name, part_p_partkey, part_p_mfgr, supplier_s_address, supplier_s_phone, supplier_s_comment, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, part_p_partkey_0, partsupp_ps_supplycost, nation_n_regionkey, region_r_regionkey, $expr1], primary key: [$0 DESC, $2 ASC, $1 ASC, $3 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $13 ASC, $14 ASC, $16 ASC, $15 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], distribution key: [] } - Table 1 { columns: [supplier_s_acctbal, supplier_s_name, nation_n_name, part_p_partkey, part_p_mfgr, supplier_s_address, supplier_s_phone, supplier_s_comment, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, part_p_partkey_0, partsupp_ps_supplycost, nation_n_regionkey, region_r_regionkey, $expr1], primary key: [$17 ASC, $0 DESC, $2 ASC, $1 ASC, $3 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $13 ASC, $14 ASC, $16 ASC, $15 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], distribution key: [15], vnode column idx: 17 } - Table 2 { columns: [part_p_partkey, part_p_mfgr, supplier_s_name, supplier_s_address, supplier_s_phone, supplier_s_acctbal, supplier_s_comment, nation_n_name, nation_n_regionkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, partsupp_ps_supplycost, part_p_partkey_0], primary key: [$8 ASC, $0 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $13 ASC, $15 ASC, $14 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], distribution key: [8] } - Table 3 { columns: [nation_n_regionkey, part_p_partkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, part_p_partkey_0, partsupp_ps_supplycost, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [9], distribution key: [0] } - Table 4 { columns: [region_r_regionkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 5 { columns: [region_r_regionkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 6 { columns: [part_p_partkey, part_p_mfgr, partsupp_ps_supplycost, supplier_s_name, supplier_s_address, supplier_s_phone, supplier_s_acctbal, supplier_s_comment, nation_n_name, nation_n_regionkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, supplier_s_nationkey, nation_n_nationkey], primary key: [$0 ASC, $2 ASC, $10 ASC, $11 ASC, $12 ASC, $14 ASC, $13 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0] } - Table 7 { columns: [part_p_partkey, partsupp_ps_supplycost, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7], distribution key: [0] } - Table 8 { columns: [part_p_partkey, min(partsupp_ps_supplycost)], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0] } - Table 9 { columns: [part_p_partkey, min(partsupp_ps_supplycost), _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 10 { columns: [part_p_partkey, part_p_mfgr, partsupp_ps_supplycost, supplier_s_name, supplier_s_address, supplier_s_nationkey, supplier_s_phone, supplier_s_acctbal, supplier_s_comment, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey], primary key: [$5 ASC, $0 ASC, $9 ASC, $10 ASC, $11 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], distribution key: [5] } - Table 11 { columns: [supplier_s_nationkey, part_p_partkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [5], distribution key: [0] } - Table 12 { columns: [nation_n_nationkey, nation_n_name, nation_n_regionkey], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 13 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 14 { columns: [part_p_partkey, part_p_mfgr, partsupp_ps_suppkey, partsupp_ps_supplycost, partsupp_ps_partkey], primary key: [$2 ASC, $0 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2] } - Table 15 { columns: [partsupp_ps_suppkey, part_p_partkey, partsupp_ps_partkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 16 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_address, supplier_s_nationkey, supplier_s_phone, supplier_s_acctbal, supplier_s_comment], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0] } - Table 17 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 18 { columns: [part_p_partkey, part_p_mfgr], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 19 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 20 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, partsupp_ps_supplycost], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 21 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 22 { columns: [part_p_partkey, partsupp_ps_supplycost, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, region_r_regionkey, nation_n_regionkey], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0] } - Table 23 { columns: [part_p_partkey, min(partsupp_ps_supplycost), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 24 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 25 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 26 { columns: [partsupp_ps_partkey, partsupp_ps_supplycost, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, nation_n_regionkey, region_r_regionkey], primary key: [$0 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $7 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [0] } - Table 27 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, region_r_regionkey, nation_n_regionkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7], distribution key: [0] } - Table 28 { columns: [part_p_partkey, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 29 { columns: [partsupp_ps_partkey, partsupp_ps_supplycost, nation_n_regionkey, partsupp_ps_suppkey, supplier_s_suppkey, supplier_s_nationkey, nation_n_nationkey], primary key: [$2 ASC, $0 ASC, $3 ASC, $4 ASC, $6 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [2] } - Table 30 { columns: [nation_n_regionkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [6], distribution key: [0] } - Table 31 { columns: [region_r_regionkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 32 { columns: [region_r_regionkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 33 { columns: [partsupp_ps_partkey, partsupp_ps_supplycost, supplier_s_nationkey, partsupp_ps_suppkey, supplier_s_suppkey], primary key: [$2 ASC, $0 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2] } - Table 34 { columns: [supplier_s_nationkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 35 { columns: [nation_n_nationkey, nation_n_regionkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 36 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 37 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, partsupp_ps_supplycost], primary key: [$1 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [1] } - Table 38 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 39 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 40 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment, partsupp.ps_partkey, partsupp.ps_suppkey, supplier.s_suppkey, nation.n_nationkey, supplier.s_nationkey, part.p_partkey, partsupp.ps_supplycost, nation.n_regionkey, region.r_regionkey], primary key: [$0 DESC, $2 ASC, $1 ASC, $3 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $13 ASC, $14 ASC, $16 ASC, $15 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], distribution key: [] } + Table 0 { columns: [supplier_s_acctbal, supplier_s_name, nation_n_name, part_p_partkey, part_p_mfgr, supplier_s_address, supplier_s_phone, supplier_s_comment, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, part_p_partkey_0, partsupp_ps_supplycost, nation_n_regionkey, region_r_regionkey, $expr1], primary key: [$0 DESC, $2 ASC, $1 ASC, $3 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $13 ASC, $14 ASC, $16 ASC, $15 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [supplier_s_acctbal, supplier_s_name, nation_n_name, part_p_partkey, part_p_mfgr, supplier_s_address, supplier_s_phone, supplier_s_comment, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, part_p_partkey_0, partsupp_ps_supplycost, nation_n_regionkey, region_r_regionkey, $expr1], primary key: [$17 ASC, $0 DESC, $2 ASC, $1 ASC, $3 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $13 ASC, $14 ASC, $16 ASC, $15 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], distribution key: [15], read pk prefix len hint: 1, vnode column idx: 17 } + Table 2 { columns: [part_p_partkey, part_p_mfgr, supplier_s_name, supplier_s_address, supplier_s_phone, supplier_s_acctbal, supplier_s_comment, nation_n_name, nation_n_regionkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, partsupp_ps_supplycost, part_p_partkey_0], primary key: [$8 ASC, $0 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $13 ASC, $15 ASC, $14 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], distribution key: [8], read pk prefix len hint: 1 } + Table 3 { columns: [nation_n_regionkey, part_p_partkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, part_p_partkey_0, partsupp_ps_supplycost, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [9], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [region_r_regionkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [region_r_regionkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [part_p_partkey, part_p_mfgr, partsupp_ps_supplycost, supplier_s_name, supplier_s_address, supplier_s_phone, supplier_s_acctbal, supplier_s_comment, nation_n_name, nation_n_regionkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, supplier_s_nationkey, nation_n_nationkey], primary key: [$0 ASC, $2 ASC, $10 ASC, $11 ASC, $12 ASC, $14 ASC, $13 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0], read pk prefix len hint: 2 } + Table 7 { columns: [part_p_partkey, partsupp_ps_supplycost, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7], distribution key: [0], read pk prefix len hint: 2 } + Table 8 { columns: [part_p_partkey, min(partsupp_ps_supplycost)], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 2 } + Table 9 { columns: [part_p_partkey, min(partsupp_ps_supplycost), _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 2 } + Table 10 { columns: [part_p_partkey, part_p_mfgr, partsupp_ps_supplycost, supplier_s_name, supplier_s_address, supplier_s_nationkey, supplier_s_phone, supplier_s_acctbal, supplier_s_comment, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey], primary key: [$5 ASC, $0 ASC, $9 ASC, $10 ASC, $11 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], distribution key: [5], read pk prefix len hint: 1 } + Table 11 { columns: [supplier_s_nationkey, part_p_partkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [5], distribution key: [0], read pk prefix len hint: 1 } + Table 12 { columns: [nation_n_nationkey, nation_n_name, nation_n_regionkey], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 13 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 14 { columns: [part_p_partkey, part_p_mfgr, partsupp_ps_suppkey, partsupp_ps_supplycost, partsupp_ps_partkey], primary key: [$2 ASC, $0 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2], read pk prefix len hint: 1 } + Table 15 { columns: [partsupp_ps_suppkey, part_p_partkey, partsupp_ps_partkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 16 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_address, supplier_s_nationkey, supplier_s_phone, supplier_s_acctbal, supplier_s_comment], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0], read pk prefix len hint: 1 } + Table 17 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 18 { columns: [part_p_partkey, part_p_mfgr], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 19 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 20 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, partsupp_ps_supplycost], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 21 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 22 { columns: [part_p_partkey, partsupp_ps_supplycost, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, region_r_regionkey, nation_n_regionkey], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0], read pk prefix len hint: 1 } + Table 23 { columns: [part_p_partkey, min(partsupp_ps_supplycost), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 24 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 25 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 26 { columns: [partsupp_ps_partkey, partsupp_ps_supplycost, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, nation_n_regionkey, region_r_regionkey], primary key: [$0 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $7 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [0], read pk prefix len hint: 1 } + Table 27 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, region_r_regionkey, nation_n_regionkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7], distribution key: [0], read pk prefix len hint: 1 } + Table 28 { columns: [part_p_partkey, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 29 { columns: [partsupp_ps_partkey, partsupp_ps_supplycost, nation_n_regionkey, partsupp_ps_suppkey, supplier_s_suppkey, supplier_s_nationkey, nation_n_nationkey], primary key: [$2 ASC, $0 ASC, $3 ASC, $4 ASC, $6 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [2], read pk prefix len hint: 1 } + Table 30 { columns: [nation_n_regionkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [6], distribution key: [0], read pk prefix len hint: 1 } + Table 31 { columns: [region_r_regionkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 32 { columns: [region_r_regionkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 33 { columns: [partsupp_ps_partkey, partsupp_ps_supplycost, supplier_s_nationkey, partsupp_ps_suppkey, supplier_s_suppkey], primary key: [$2 ASC, $0 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2], read pk prefix len hint: 1 } + Table 34 { columns: [supplier_s_nationkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 1 } + Table 35 { columns: [nation_n_nationkey, nation_n_regionkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 36 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 37 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, partsupp_ps_supplycost], primary key: [$1 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [1], read pk prefix len hint: 1 } + Table 38 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 39 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 40 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address, s_phone, s_comment, partsupp.ps_partkey, partsupp.ps_suppkey, supplier.s_suppkey, nation.n_nationkey, supplier.s_nationkey, part.p_partkey, partsupp.ps_supplycost, nation.n_regionkey, region.r_regionkey], primary key: [$0 DESC, $2 ASC, $1 ASC, $3 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $13 ASC, $14 ASC, $16 ASC, $15 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], distribution key: [], read pk prefix len hint: 10 } - id: tpch_q3 before: - create_tables @@ -631,7 +631,7 @@ StreamProject { exprs: [lineitem.l_orderkey, sum($expr1), orders.o_orderdate, orders.o_shippriority, Vnode(lineitem.l_orderkey, orders.o_orderdate, orders.o_shippriority) as $expr2] } StreamProject { exprs: [lineitem.l_orderkey, sum($expr1), orders.o_orderdate, orders.o_shippriority] } StreamHashAgg { group_key: [lineitem.l_orderkey, orders.o_orderdate, orders.o_shippriority], aggs: [sum($expr1), count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamExchange Hash([0, 1, 2]) from 2 Fragment 2 @@ -667,18 +667,18 @@ Upstream BatchPlanNode - Table 0 { columns: [lineitem_l_orderkey, sum($expr1), orders_o_orderdate, orders_o_shippriority, $expr2], primary key: [$1 DESC, $2 ASC, $0 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [] } - Table 1 { columns: [lineitem_l_orderkey, sum($expr1), orders_o_orderdate, orders_o_shippriority, $expr2], primary key: [$4 ASC, $1 DESC, $2 ASC, $0 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0, 2, 3], vnode column idx: 4 } - Table 2 { columns: [lineitem_l_orderkey, orders_o_orderdate, orders_o_shippriority, sum($expr1), count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3, 4], distribution key: [0, 1, 2] } - Table 3 { columns: [orders_o_orderkey, orders_o_orderdate, orders_o_shippriority, customer_c_custkey], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 4 { columns: [orders_o_orderkey, customer_c_custkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 5 { columns: [lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_linenumber], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 6 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 7 { columns: [customer_c_custkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 8 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 9 { columns: [orders_o_orderkey, orders_o_custkey, orders_o_orderdate, orders_o_shippriority], primary key: [$1 ASC, $0 ASC], value indices: [0, 1, 2, 3], distribution key: [1] } - Table 10 { columns: [orders_o_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [l_orderkey, revenue, o_orderdate, o_shippriority], primary key: [$1 DESC, $2 ASC, $0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [] } + Table 0 { columns: [lineitem_l_orderkey, sum($expr1), orders_o_orderdate, orders_o_shippriority, $expr2], primary key: [$1 DESC, $2 ASC, $0 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [lineitem_l_orderkey, sum($expr1), orders_o_orderdate, orders_o_shippriority, $expr2], primary key: [$4 ASC, $1 DESC, $2 ASC, $0 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0, 2, 3], read pk prefix len hint: 1, vnode column idx: 4 } + Table 2 { columns: [lineitem_l_orderkey, orders_o_orderdate, orders_o_shippriority, sum($expr1), count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3, 4], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 3 { columns: [orders_o_orderkey, orders_o_orderdate, orders_o_shippriority, customer_c_custkey], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [orders_o_orderkey, customer_c_custkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_linenumber], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [customer_c_custkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 8 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [orders_o_orderkey, orders_o_custkey, orders_o_orderdate, orders_o_shippriority], primary key: [$1 ASC, $0 ASC], value indices: [0, 1, 2, 3], distribution key: [1], read pk prefix len hint: 1 } + Table 10 { columns: [orders_o_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [l_orderkey, revenue, o_orderdate, o_shippriority], primary key: [$1 DESC, $2 ASC, $0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [], read pk prefix len hint: 3 } - id: tpch_q4 before: - create_tables @@ -751,7 +751,7 @@ StreamMaterialize { columns: [o_orderpriority, order_count], pk_columns: [o_orderpriority], pk_conflict: "no check" } materialized table: 4294967294 StreamHashAgg { group_key: [orders.o_orderpriority], aggs: [count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -774,12 +774,12 @@ Upstream BatchPlanNode - Table 0 { columns: [orders_o_orderpriority, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 1 { columns: [orders_o_orderkey, orders_o_orderpriority], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 2 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 3 { columns: [lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0] } - Table 4 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [o_orderpriority, order_count], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } + Table 0 { columns: [orders_o_orderpriority, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [orders_o_orderkey, orders_o_orderpriority], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [o_orderpriority, order_count], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } - id: tpch_q5 before: - create_tables @@ -900,7 +900,7 @@ materialized table: 4294967294 StreamProject { exprs: [nation.n_name, sum($expr1)] } StreamHashAgg { group_key: [nation.n_name], aggs: [sum($expr1), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -968,28 +968,28 @@ Upstream BatchPlanNode - Table 0 { columns: [nation_n_name, sum($expr1), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 1 { columns: [lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, nation_n_regionkey, customer_c_custkey, orders_o_orderkey, supplier_s_suppkey, customer_c_nationkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_nationkey, nation_n_nationkey], primary key: [$3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $11 ASC, $10 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], distribution key: [3] } - Table 2 { columns: [nation_n_regionkey, customer_c_custkey, orders_o_orderkey, supplier_s_suppkey, customer_c_nationkey, lineitem_l_orderkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [9], distribution key: [0] } - Table 3 { columns: [region_r_regionkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 4 { columns: [region_r_regionkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 5 { columns: [supplier_s_nationkey, lineitem_l_extendedprice, lineitem_l_discount, customer_c_custkey, orders_o_orderkey, supplier_s_suppkey, customer_c_nationkey, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0] } - Table 6 { columns: [supplier_s_nationkey, customer_c_custkey, orders_o_orderkey, supplier_s_suppkey, customer_c_nationkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7], distribution key: [0] } - Table 7 { columns: [nation_n_nationkey, nation_n_name, nation_n_regionkey], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 8 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 9 { columns: [orders_o_orderkey, supplier_s_suppkey, supplier_s_nationkey, customer_c_custkey, customer_c_nationkey], primary key: [$0 ASC, $1 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0, 1] } - Table 10 { columns: [orders_o_orderkey, supplier_s_suppkey, customer_c_custkey, customer_c_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1] } - Table 11 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_linenumber], primary key: [$0 ASC, $1 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0, 1] } - Table 12 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1] } - Table 13 { columns: [customer_c_nationkey, orders_o_orderkey, customer_c_custkey], primary key: [$0 ASC, $2 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 14 { columns: [customer_c_nationkey, customer_c_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 15 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [1] } - Table 16 { columns: [supplier_s_nationkey, supplier_s_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 17 { columns: [customer_c_custkey, customer_c_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 18 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 19 { columns: [orders_o_orderkey, orders_o_custkey], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [1] } - Table 20 { columns: [orders_o_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [n_name, revenue], primary key: [$1 DESC, $0 ASC], value indices: [0, 1], distribution key: [0] } + Table 0 { columns: [nation_n_name, sum($expr1), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, nation_n_regionkey, customer_c_custkey, orders_o_orderkey, supplier_s_suppkey, customer_c_nationkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_nationkey, nation_n_nationkey], primary key: [$3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $11 ASC, $10 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], distribution key: [3], read pk prefix len hint: 1 } + Table 2 { columns: [nation_n_regionkey, customer_c_custkey, orders_o_orderkey, supplier_s_suppkey, customer_c_nationkey, lineitem_l_orderkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [9], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [region_r_regionkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [region_r_regionkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [supplier_s_nationkey, lineitem_l_extendedprice, lineitem_l_discount, customer_c_custkey, orders_o_orderkey, supplier_s_suppkey, customer_c_nationkey, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [supplier_s_nationkey, customer_c_custkey, orders_o_orderkey, supplier_s_suppkey, customer_c_nationkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [nation_n_nationkey, nation_n_name, nation_n_regionkey], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 8 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [orders_o_orderkey, supplier_s_suppkey, supplier_s_nationkey, customer_c_custkey, customer_c_nationkey], primary key: [$0 ASC, $1 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 10 { columns: [orders_o_orderkey, supplier_s_suppkey, customer_c_custkey, customer_c_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 11 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_linenumber], primary key: [$0 ASC, $1 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 12 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 13 { columns: [customer_c_nationkey, orders_o_orderkey, customer_c_custkey], primary key: [$0 ASC, $2 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 14 { columns: [customer_c_nationkey, customer_c_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 15 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 16 { columns: [supplier_s_nationkey, supplier_s_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 17 { columns: [customer_c_custkey, customer_c_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 18 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 19 { columns: [orders_o_orderkey, orders_o_custkey], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 20 { columns: [orders_o_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [n_name, revenue], primary key: [$1 DESC, $0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } - id: tpch_q6 before: - create_tables @@ -1035,7 +1035,7 @@ materialized table: 4294967294 StreamProject { exprs: [sum(sum($expr1))] } StreamGlobalSimpleAgg { aggs: [sum(sum($expr1)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -1046,8 +1046,8 @@ Upstream BatchPlanNode - Table 0 { columns: [sum(sum($expr1)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [revenue], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [sum(sum($expr1)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [revenue], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: tpch_q7 before: - create_tables @@ -1177,7 +1177,7 @@ materialized table: 4294967294 StreamProject { exprs: [nation.n_name, nation.n_name, $expr1, sum($expr2)] } StreamHashAgg { group_key: [nation.n_name, nation.n_name, $expr1], aggs: [sum($expr2), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0, 1, 2]) from 1 Fragment 1 @@ -1243,28 +1243,28 @@ Upstream BatchPlanNode - Table 0 { columns: [nation_n_name, nation_n_name_0, $expr1, sum($expr2), count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3, 4], distribution key: [0, 1, 2] } - Table 1 { columns: [lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_shipdate, nation_n_name, customer_c_nationkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, orders_o_custkey, customer_c_custkey], primary key: [$4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $12 ASC, $11 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [4] } - Table 2 { columns: [customer_c_nationkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, customer_c_custkey, orders_o_custkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [9], distribution key: [0] } - Table 3 { columns: [nation_n_nationkey, nation_n_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 4 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 5 { columns: [lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_shipdate, nation_n_name, orders_o_custkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey], primary key: [$4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], distribution key: [4] } - Table 6 { columns: [orders_o_custkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7], distribution key: [0] } - Table 7 { columns: [customer_c_custkey, customer_c_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 8 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 9 { columns: [lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_shipdate, nation_n_name, supplier_s_suppkey, lineitem_l_linenumber, supplier_s_nationkey, nation_n_nationkey], primary key: [$0 ASC, $5 ASC, $6 ASC, $8 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0] } - Table 10 { columns: [lineitem_l_orderkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [5], distribution key: [0] } - Table 11 { columns: [orders_o_orderkey, orders_o_custkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 12 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 13 { columns: [supplier_s_nationkey, lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_shipdate, supplier_s_suppkey, lineitem_l_linenumber], primary key: [$0 ASC, $5 ASC, $1 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0] } - Table 14 { columns: [supplier_s_nationkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 15 { columns: [nation_n_nationkey, nation_n_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 16 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 17 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 18 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 19 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_shipdate, lineitem_l_linenumber], primary key: [$1 ASC, $0 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1] } - Table 20 { columns: [lineitem_l_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 4294967294 { columns: [supp_nation, cust_nation, l_year, revenue], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2, 3], distribution key: [0, 1, 2] } + Table 0 { columns: [nation_n_name, nation_n_name_0, $expr1, sum($expr2), count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3, 4], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 1 { columns: [lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_shipdate, nation_n_name, customer_c_nationkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, orders_o_custkey, customer_c_custkey], primary key: [$4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $12 ASC, $11 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [4], read pk prefix len hint: 1 } + Table 2 { columns: [customer_c_nationkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, customer_c_custkey, orders_o_custkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [9], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [nation_n_nationkey, nation_n_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_shipdate, nation_n_name, orders_o_custkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey], primary key: [$4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], distribution key: [4], read pk prefix len hint: 1 } + Table 6 { columns: [orders_o_custkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [customer_c_custkey, customer_c_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 8 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_shipdate, nation_n_name, supplier_s_suppkey, lineitem_l_linenumber, supplier_s_nationkey, nation_n_nationkey], primary key: [$0 ASC, $5 ASC, $6 ASC, $8 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0], read pk prefix len hint: 1 } + Table 10 { columns: [lineitem_l_orderkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [5], distribution key: [0], read pk prefix len hint: 1 } + Table 11 { columns: [orders_o_orderkey, orders_o_custkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 12 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 13 { columns: [supplier_s_nationkey, lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_shipdate, supplier_s_suppkey, lineitem_l_linenumber], primary key: [$0 ASC, $5 ASC, $1 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0], read pk prefix len hint: 1 } + Table 14 { columns: [supplier_s_nationkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 1 } + Table 15 { columns: [nation_n_nationkey, nation_n_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 16 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 17 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 18 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 19 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_shipdate, lineitem_l_linenumber], primary key: [$1 ASC, $0 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1], read pk prefix len hint: 1 } + Table 20 { columns: [lineitem_l_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [supp_nation, cust_nation, l_year, revenue], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2, 3], distribution key: [0, 1, 2], read pk prefix len hint: 3 } - id: tpch_q8 before: - create_tables @@ -1418,7 +1418,7 @@ materialized table: 4294967294 StreamProject { exprs: [$expr1, RoundDigit((sum($expr2) / sum($expr3)), 6:Int32) as $expr4] } StreamHashAgg { group_key: [$expr1], aggs: [sum($expr2), sum($expr3), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -1509,36 +1509,36 @@ Upstream BatchPlanNode - Table 0 { columns: [$expr1, sum($expr2), sum($expr3), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [0] } - Table 1 { columns: [lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, orders_o_orderdate, nation_n_regionkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, customer_c_custkey, orders_o_custkey, customer_c_nationkey, nation_n_nationkey_0], primary key: [$4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $13 ASC, $14 ASC, $16 ASC, $15 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], distribution key: [4] } - Table 2 { columns: [nation_n_regionkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, customer_c_custkey, orders_o_custkey, nation_n_nationkey_0, customer_c_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC], value indices: [13], distribution key: [0] } - Table 3 { columns: [region_r_regionkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 4 { columns: [region_r_regionkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 5 { columns: [lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, orders_o_orderdate, customer_c_nationkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, orders_o_custkey, customer_c_custkey], primary key: [$4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $14 ASC, $13 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [4] } - Table 6 { columns: [customer_c_nationkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, customer_c_custkey, orders_o_custkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC], value indices: [11], distribution key: [0] } - Table 7 { columns: [nation_n_nationkey, nation_n_regionkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 8 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 9 { columns: [lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, orders_o_custkey, orders_o_orderdate, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey], primary key: [$3 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [3] } - Table 10 { columns: [orders_o_custkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [9], distribution key: [0] } - Table 11 { columns: [customer_c_custkey, customer_c_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 12 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 13 { columns: [lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, supplier_s_nationkey, nation_n_nationkey], primary key: [$0 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $9 ASC, $8 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0] } - Table 14 { columns: [lineitem_l_orderkey, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7], distribution key: [0] } - Table 15 { columns: [orders_o_orderkey, orders_o_custkey, orders_o_orderdate], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 16 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 17 { columns: [lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, supplier_s_nationkey, part_p_partkey, lineitem_l_linenumber, lineitem_l_suppkey, supplier_s_suppkey], primary key: [$3 ASC, $4 ASC, $0 ASC, $5 ASC, $7 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [3] } - Table 18 { columns: [supplier_s_nationkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [6], distribution key: [0] } - Table 19 { columns: [nation_n_nationkey, nation_n_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 20 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 21 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_extendedprice, lineitem_l_discount, part_p_partkey, lineitem_l_linenumber], primary key: [$1 ASC, $4 ASC, $0 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1] } - Table 22 { columns: [lineitem_l_suppkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 23 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 24 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 25 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 26 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 27 { columns: [lineitem_l_orderkey, lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_linenumber], primary key: [$1 ASC, $0 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1] } - Table 28 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 4294967294 { columns: [o_year, mkt_share], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } + Table 0 { columns: [$expr1, sum($expr2), sum($expr3), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, orders_o_orderdate, nation_n_regionkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, customer_c_custkey, orders_o_custkey, customer_c_nationkey, nation_n_nationkey_0], primary key: [$4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $13 ASC, $14 ASC, $16 ASC, $15 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], distribution key: [4], read pk prefix len hint: 1 } + Table 2 { columns: [nation_n_regionkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, customer_c_custkey, orders_o_custkey, nation_n_nationkey_0, customer_c_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC], value indices: [13], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [region_r_regionkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [region_r_regionkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, orders_o_orderdate, customer_c_nationkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, orders_o_custkey, customer_c_custkey], primary key: [$4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC, $14 ASC, $13 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [4], read pk prefix len hint: 1 } + Table 6 { columns: [customer_c_nationkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, customer_c_custkey, orders_o_custkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC], value indices: [11], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [nation_n_nationkey, nation_n_regionkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 8 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, orders_o_custkey, orders_o_orderdate, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey], primary key: [$3 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $12 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], distribution key: [3], read pk prefix len hint: 1 } + Table 10 { columns: [orders_o_custkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC], value indices: [9], distribution key: [0], read pk prefix len hint: 1 } + Table 11 { columns: [customer_c_custkey, customer_c_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 12 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 13 { columns: [lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, supplier_s_nationkey, nation_n_nationkey], primary key: [$0 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $9 ASC, $8 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [0], read pk prefix len hint: 1 } + Table 14 { columns: [lineitem_l_orderkey, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7], distribution key: [0], read pk prefix len hint: 1 } + Table 15 { columns: [orders_o_orderkey, orders_o_custkey, orders_o_orderdate], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 16 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 17 { columns: [lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, supplier_s_nationkey, part_p_partkey, lineitem_l_linenumber, lineitem_l_suppkey, supplier_s_suppkey], primary key: [$3 ASC, $4 ASC, $0 ASC, $5 ASC, $7 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [3], read pk prefix len hint: 1 } + Table 18 { columns: [supplier_s_nationkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [6], distribution key: [0], read pk prefix len hint: 1 } + Table 19 { columns: [nation_n_nationkey, nation_n_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 20 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 21 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_extendedprice, lineitem_l_discount, part_p_partkey, lineitem_l_linenumber], primary key: [$1 ASC, $4 ASC, $0 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1], read pk prefix len hint: 1 } + Table 22 { columns: [lineitem_l_suppkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 1 } + Table 23 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 24 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 25 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 26 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 27 { columns: [lineitem_l_orderkey, lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_linenumber], primary key: [$1 ASC, $0 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1], read pk prefix len hint: 1 } + Table 28 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [o_year, mkt_share], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } - id: tpch_q9 before: - create_tables @@ -1664,7 +1664,7 @@ materialized table: 4294967294 StreamProject { exprs: [nation.n_name, $expr1, RoundDigit(sum($expr2), 2:Int32) as $expr3] } StreamHashAgg { group_key: [nation.n_name, $expr1], aggs: [sum($expr2), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0, 1]) from 1 Fragment 1 @@ -1730,28 +1730,28 @@ Upstream BatchPlanNode - Table 0 { columns: [nation_n_name, $expr1, sum($expr2), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0, 1] } - Table 1 { columns: [lineitem_l_orderkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, partsupp_ps_supplycost, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, lineitem_l_partkey, partsupp_ps_partkey, partsupp_ps_suppkey], primary key: [$0 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $13 ASC, $14 ASC, $12 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0] } - Table 2 { columns: [lineitem_l_orderkey, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, partsupp_ps_partkey, partsupp_ps_suppkey, lineitem_l_partkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC], value indices: [10], distribution key: [0] } - Table 3 { columns: [orders_o_orderkey, orders_o_orderdate], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 4 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 5 { columns: [lineitem_l_orderkey, lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey, supplier_s_nationkey, nation_n_nationkey], primary key: [$2 ASC, $1 ASC, $7 ASC, $0 ASC, $8 ASC, $9 ASC, $11 ASC, $10 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], distribution key: [1, 2] } - Table 6 { columns: [lineitem_l_suppkey, lineitem_l_partkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC], value indices: [8], distribution key: [1, 0] } - Table 7 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, partsupp_ps_supplycost], primary key: [$1 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [0, 1] } - Table 8 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [1, 0] } - Table 9 { columns: [lineitem_l_orderkey, lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, supplier_s_nationkey, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey], primary key: [$6 ASC, $7 ASC, $0 ASC, $8 ASC, $9 ASC, $2 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [6] } - Table 10 { columns: [supplier_s_nationkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [6], distribution key: [0] } - Table 11 { columns: [nation_n_nationkey, nation_n_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 12 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 13 { columns: [lineitem_l_orderkey, lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, part_p_partkey, lineitem_l_linenumber], primary key: [$2 ASC, $6 ASC, $0 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [2] } - Table 14 { columns: [lineitem_l_suppkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 15 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 16 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 17 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 18 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 19 { columns: [lineitem_l_orderkey, lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_linenumber], primary key: [$1 ASC, $0 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [1] } - Table 20 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 4294967294 { columns: [nation, o_year, sum_profit], primary key: [$0 ASC, $1 DESC], value indices: [0, 1, 2], distribution key: [0, 1] } + Table 0 { columns: [nation_n_name, $expr1, sum($expr2), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 1 { columns: [lineitem_l_orderkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, partsupp_ps_supplycost, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, lineitem_l_partkey, partsupp_ps_partkey, partsupp_ps_suppkey], primary key: [$0 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC, $10 ASC, $11 ASC, $13 ASC, $14 ASC, $12 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [lineitem_l_orderkey, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, nation_n_nationkey, supplier_s_nationkey, partsupp_ps_partkey, partsupp_ps_suppkey, lineitem_l_partkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC, $8 ASC, $9 ASC], value indices: [10], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [orders_o_orderkey, orders_o_orderdate], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [lineitem_l_orderkey, lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, nation_n_name, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey, supplier_s_nationkey, nation_n_nationkey], primary key: [$2 ASC, $1 ASC, $7 ASC, $0 ASC, $8 ASC, $9 ASC, $11 ASC, $10 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], distribution key: [1, 2], read pk prefix len hint: 2 } + Table 6 { columns: [lineitem_l_suppkey, lineitem_l_partkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC], value indices: [8], distribution key: [1, 0], read pk prefix len hint: 2 } + Table 7 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, partsupp_ps_supplycost], primary key: [$1 ASC, $0 ASC], value indices: [0, 1, 2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 8 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [1, 0], read pk prefix len hint: 2 } + Table 9 { columns: [lineitem_l_orderkey, lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, supplier_s_nationkey, part_p_partkey, lineitem_l_linenumber, supplier_s_suppkey], primary key: [$6 ASC, $7 ASC, $0 ASC, $8 ASC, $9 ASC, $2 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [6], read pk prefix len hint: 1 } + Table 10 { columns: [supplier_s_nationkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, supplier_s_suppkey, lineitem_l_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [6], distribution key: [0], read pk prefix len hint: 1 } + Table 11 { columns: [nation_n_nationkey, nation_n_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 12 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 13 { columns: [lineitem_l_orderkey, lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, part_p_partkey, lineitem_l_linenumber], primary key: [$2 ASC, $6 ASC, $0 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [2], read pk prefix len hint: 1 } + Table 14 { columns: [lineitem_l_suppkey, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 1 } + Table 15 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 16 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 17 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 18 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 19 { columns: [lineitem_l_orderkey, lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_linenumber], primary key: [$1 ASC, $0 ASC, $6 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [1], read pk prefix len hint: 1 } + Table 20 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [nation, o_year, sum_profit], primary key: [$0 ASC, $1 DESC], value indices: [0, 1, 2], distribution key: [0, 1], read pk prefix len hint: 2 } - id: tpch_q10 before: - create_tables @@ -1879,7 +1879,7 @@ StreamProject { exprs: [customer.c_custkey, customer.c_name, sum($expr1), customer.c_acctbal, nation.n_name, customer.c_address, customer.c_phone, customer.c_comment, Vnode(customer.c_custkey, customer.c_name, customer.c_acctbal, customer.c_phone, nation.n_name, customer.c_address, customer.c_comment) as $expr2] } StreamProject { exprs: [customer.c_custkey, customer.c_name, sum($expr1), customer.c_acctbal, nation.n_name, customer.c_address, customer.c_phone, customer.c_comment] } StreamHashAgg { group_key: [customer.c_custkey, customer.c_name, customer.c_acctbal, customer.c_phone, nation.n_name, customer.c_address, customer.c_comment], aggs: [sum($expr1), count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamExchange Hash([0, 1, 2, 3, 4, 5, 6]) from 2 Fragment 2 @@ -1925,22 +1925,22 @@ Upstream BatchPlanNode - Table 0 { columns: [customer_c_custkey, customer_c_name, sum($expr1), customer_c_acctbal, nation_n_name, customer_c_address, customer_c_phone, customer_c_comment, $expr2], primary key: [$2 DESC, $0 ASC, $1 ASC, $3 ASC, $6 ASC, $4 ASC, $5 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [] } - Table 1 { columns: [customer_c_custkey, customer_c_name, sum($expr1), customer_c_acctbal, nation_n_name, customer_c_address, customer_c_phone, customer_c_comment, $expr2], primary key: [$8 ASC, $2 DESC, $0 ASC, $1 ASC, $3 ASC, $6 ASC, $4 ASC, $5 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0, 1, 3, 6, 4, 5, 7], vnode column idx: 8 } - Table 2 { columns: [customer_c_custkey, customer_c_name, customer_c_acctbal, customer_c_phone, nation_n_name, customer_c_address, customer_c_comment, sum($expr1), count], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7, 8], distribution key: [0, 1, 2, 3, 4, 5, 6] } - Table 3 { columns: [customer_c_custkey, customer_c_name, customer_c_address, customer_c_phone, customer_c_acctbal, customer_c_comment, orders_o_orderkey, nation_n_name, customer_c_nationkey, nation_n_nationkey], primary key: [$6 ASC, $0 ASC, $9 ASC, $8 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [6] } - Table 4 { columns: [orders_o_orderkey, customer_c_custkey, nation_n_nationkey, customer_c_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 5 { columns: [lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_linenumber], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 6 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 7 { columns: [customer_c_custkey, customer_c_name, customer_c_address, customer_c_nationkey, customer_c_phone, customer_c_acctbal, customer_c_comment, orders_o_orderkey], primary key: [$3 ASC, $0 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [3] } - Table 8 { columns: [customer_c_nationkey, customer_c_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 9 { columns: [nation_n_nationkey, nation_n_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 10 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 11 { columns: [customer_c_custkey, customer_c_name, customer_c_address, customer_c_nationkey, customer_c_phone, customer_c_acctbal, customer_c_comment], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0] } - Table 12 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 13 { columns: [orders_o_orderkey, orders_o_custkey], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [1] } - Table 14 { columns: [orders_o_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [c_custkey, c_name, revenue, c_acctbal, n_name, c_address, c_phone, c_comment], primary key: [$2 DESC, $0 ASC, $1 ASC, $3 ASC, $6 ASC, $4 ASC, $5 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [] } + Table 0 { columns: [customer_c_custkey, customer_c_name, sum($expr1), customer_c_acctbal, nation_n_name, customer_c_address, customer_c_phone, customer_c_comment, $expr2], primary key: [$2 DESC, $0 ASC, $1 ASC, $3 ASC, $6 ASC, $4 ASC, $5 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [customer_c_custkey, customer_c_name, sum($expr1), customer_c_acctbal, nation_n_name, customer_c_address, customer_c_phone, customer_c_comment, $expr2], primary key: [$8 ASC, $2 DESC, $0 ASC, $1 ASC, $3 ASC, $6 ASC, $4 ASC, $5 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8], distribution key: [0, 1, 3, 6, 4, 5, 7], read pk prefix len hint: 1, vnode column idx: 8 } + Table 2 { columns: [customer_c_custkey, customer_c_name, customer_c_acctbal, customer_c_phone, nation_n_name, customer_c_address, customer_c_comment, sum($expr1), count], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC], value indices: [7, 8], distribution key: [0, 1, 2, 3, 4, 5, 6], read pk prefix len hint: 7 } + Table 3 { columns: [customer_c_custkey, customer_c_name, customer_c_address, customer_c_phone, customer_c_acctbal, customer_c_comment, orders_o_orderkey, nation_n_name, customer_c_nationkey, nation_n_nationkey], primary key: [$6 ASC, $0 ASC, $9 ASC, $8 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], distribution key: [6], read pk prefix len hint: 1 } + Table 4 { columns: [orders_o_orderkey, customer_c_custkey, nation_n_nationkey, customer_c_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [lineitem_l_orderkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_linenumber], primary key: [$0 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [customer_c_custkey, customer_c_name, customer_c_address, customer_c_nationkey, customer_c_phone, customer_c_acctbal, customer_c_comment, orders_o_orderkey], primary key: [$3 ASC, $0 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [3], read pk prefix len hint: 1 } + Table 8 { columns: [customer_c_nationkey, customer_c_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [nation_n_nationkey, nation_n_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 10 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 11 { columns: [customer_c_custkey, customer_c_name, customer_c_address, customer_c_nationkey, customer_c_phone, customer_c_acctbal, customer_c_comment], primary key: [$0 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [0], read pk prefix len hint: 1 } + Table 12 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 13 { columns: [orders_o_orderkey, orders_o_custkey], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 14 { columns: [orders_o_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [c_custkey, c_name, revenue, c_acctbal, n_name, c_address, c_phone, c_comment], primary key: [$2 DESC, $0 ASC, $1 ASC, $3 ASC, $6 ASC, $4 ASC, $5 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [], read pk prefix len hint: 7 } - id: tpch_q11 before: - create_tables @@ -2078,7 +2078,7 @@ left table: 0, right table 1 StreamProject { exprs: [partsupp.ps_partkey, sum($expr1)] } StreamHashAgg { group_key: [partsupp.ps_partkey], aggs: [sum($expr1), count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 StreamExchange Broadcast from 7 @@ -2118,7 +2118,7 @@ Fragment 7 StreamProject { exprs: [(sum(sum($expr2)) * 0.0001000000:Decimal) as $expr3] } StreamGlobalSimpleAgg { aggs: [sum(sum($expr2)), count] } - result table: 11, state tables: [] + result table: 11, state tables: [], distinct tables: [] StreamExchange Single from 8 Fragment 8 @@ -2126,19 +2126,19 @@ StreamProject { exprs: [(partsupp.ps_supplycost * partsupp.ps_availqty) as $expr2, partsupp.ps_partkey, partsupp.ps_suppkey, supplier.s_suppkey, nation.n_nationkey, supplier.s_nationkey] } StreamExchange Hash([5]) from 2 - Table 0 { columns: [partsupp_ps_partkey, sum($expr1)], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [0] } - Table 1 { columns: [$expr3], primary key: [], value indices: [0], distribution key: [] } - Table 2 { columns: [partsupp_ps_partkey, sum($expr1), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 3 { columns: [partsupp_ps_partkey, partsupp_ps_availqty, partsupp_ps_supplycost, supplier_s_nationkey, partsupp_ps_suppkey, supplier_s_suppkey], primary key: [$3 ASC, $0 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [3] } - Table 4 { columns: [supplier_s_nationkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 5 { columns: [nation_n_nationkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 6 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 7 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, partsupp_ps_availqty, partsupp_ps_supplycost], primary key: [$1 ASC, $0 ASC], value indices: [0, 1, 2, 3], distribution key: [1] } - Table 8 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 9 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 10 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 11 { columns: [sum(sum($expr2)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 4294967294 { columns: [ps_partkey, value], primary key: [$1 DESC, $0 ASC], value indices: [0, 1], distribution key: [0] } + Table 0 { columns: [partsupp_ps_partkey, sum($expr1)], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 0 } + Table 1 { columns: [$expr3], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } + Table 2 { columns: [partsupp_ps_partkey, sum($expr1), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [partsupp_ps_partkey, partsupp_ps_availqty, partsupp_ps_supplycost, supplier_s_nationkey, partsupp_ps_suppkey, supplier_s_suppkey], primary key: [$3 ASC, $0 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [3], read pk prefix len hint: 1 } + Table 4 { columns: [supplier_s_nationkey, partsupp_ps_partkey, partsupp_ps_suppkey, supplier_s_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [nation_n_nationkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, partsupp_ps_availqty, partsupp_ps_supplycost], primary key: [$1 ASC, $0 ASC], value indices: [0, 1, 2, 3], distribution key: [1], read pk prefix len hint: 1 } + Table 8 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [supplier_s_suppkey, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 10 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 11 { columns: [sum(sum($expr2)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [ps_partkey, value], primary key: [$1 DESC, $0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } - id: tpch_q12 before: - create_tables @@ -2217,7 +2217,7 @@ materialized table: 4294967294 StreamProject { exprs: [lineitem.l_shipmode, sum($expr1), sum($expr2)] } StreamHashAgg { group_key: [lineitem.l_shipmode], aggs: [sum($expr1), sum($expr2), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 1 Fragment 1 @@ -2239,12 +2239,12 @@ Upstream BatchPlanNode - Table 0 { columns: [lineitem_l_shipmode, sum($expr1), sum($expr2), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [0] } - Table 1 { columns: [orders_o_orderkey, orders_o_orderpriority], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 2 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 3 { columns: [lineitem_l_orderkey, lineitem_l_shipmode, lineitem_l_linenumber], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 4 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [l_shipmode, high_line_count, low_line_count], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0] } + Table 0 { columns: [lineitem_l_shipmode, sum($expr1), sum($expr2), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [orders_o_orderkey, orders_o_orderpriority], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [lineitem_l_orderkey, lineitem_l_shipmode, lineitem_l_linenumber], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [l_shipmode, high_line_count, low_line_count], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } - id: tpch_q13 before: - create_tables @@ -2316,13 +2316,13 @@ StreamMaterialize { columns: [c_count, custdist], pk_columns: [c_count], order_descs: [custdist, c_count], pk_conflict: "no check" } materialized table: 4294967294 StreamHashAgg { group_key: [count(orders.o_orderkey)], aggs: [count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([1]) from 1 Fragment 1 StreamProject { exprs: [customer.c_custkey, count(orders.o_orderkey)] } StreamHashAgg { group_key: [customer.c_custkey], aggs: [count(orders.o_orderkey), count] } - result table: 1, state tables: [] + result table: 1, state tables: [], distinct tables: [] StreamHashJoin { type: LeftOuter, predicate: customer.c_custkey = orders.o_custkey, output: [customer.c_custkey, orders.o_orderkey] } left table: 2, right table 4, left degree table: 3, right degree table: 5, StreamExchange Hash([0]) from 2 @@ -2340,13 +2340,13 @@ Upstream BatchPlanNode - Table 0 { columns: [count(orders_o_orderkey), count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 1 { columns: [customer_c_custkey, count(orders_o_orderkey), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 2 { columns: [customer_c_custkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 3 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [orders_o_orderkey, orders_o_custkey], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [1] } - Table 5 { columns: [orders_o_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 4294967294 { columns: [c_count, custdist], primary key: [$1 DESC, $0 DESC], value indices: [0, 1], distribution key: [0] } + Table 0 { columns: [count(orders_o_orderkey), count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [customer_c_custkey, count(orders_o_orderkey), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [customer_c_custkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [orders_o_orderkey, orders_o_custkey], primary key: [$1 ASC, $0 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } + Table 5 { columns: [orders_o_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [c_count, custdist], primary key: [$1 DESC, $0 DESC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } - id: tpch_q14 before: - create_tables @@ -2410,7 +2410,7 @@ materialized table: 4294967294 StreamProject { exprs: [((100.00:Decimal * sum(sum($expr1))) / sum(sum($expr2))) as $expr3] } StreamGlobalSimpleAgg { aggs: [sum(sum($expr1)), sum(sum($expr2)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -2433,12 +2433,12 @@ Upstream BatchPlanNode - Table 0 { columns: [sum(sum($expr1)), sum(sum($expr2)), count], primary key: [], value indices: [0, 1, 2], distribution key: [] } - Table 1 { columns: [lineitem_l_partkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0] } - Table 2 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 3 { columns: [part_p_partkey, part_p_type], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 4 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [promo_revenue], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [sum(sum($expr1)), sum(sum($expr2)), count], primary key: [], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [lineitem_l_partkey, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [part_p_partkey, part_p_type], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [promo_revenue], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: tpch_q15 before: - create_tables @@ -2556,7 +2556,7 @@ Fragment 3 StreamProject { exprs: [lineitem.l_suppkey, sum($expr1)] } StreamHashAgg { group_key: [lineitem.l_suppkey], aggs: [sum($expr1), count] } - result table: 8, state tables: [] + result table: 8, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 4 Fragment 4 @@ -2569,29 +2569,29 @@ Fragment 5 StreamProject { exprs: [max(max(sum($expr1)))] } StreamGlobalSimpleAgg { aggs: [max(max(sum($expr1))), count] } - result table: 10, state tables: [9] + result table: 10, state tables: [9], distinct tables: [] StreamExchange Single from 6 Fragment 6 StreamHashAgg { group_key: [$expr2], aggs: [max(sum($expr1)), count] } - result table: 12, state tables: [11] + result table: 12, state tables: [11], distinct tables: [] StreamProject { exprs: [lineitem.l_suppkey, sum($expr1), Vnode(lineitem.l_suppkey) as $expr2] } StreamExchange Hash([0]) from 3 - Table 0 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_address, supplier_s_phone, sum($expr1), lineitem_l_suppkey], primary key: [$4 ASC, $0 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [4] } - Table 1 { columns: [sum($expr1), supplier_s_suppkey, lineitem_l_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 2 { columns: [max(max(sum($expr1)))], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 3 { columns: [max(max(sum($expr1))), _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_address, supplier_s_phone], primary key: [$0 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 5 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 6 { columns: [lineitem_l_suppkey, sum($expr1)], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 7 { columns: [lineitem_l_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 8 { columns: [lineitem_l_suppkey, sum($expr1), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 9 { columns: [max(sum($expr1)), $expr2], primary key: [$0 DESC, $1 ASC], value indices: [0, 1], distribution key: [] } - Table 10 { columns: [max(max(sum($expr1))), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 11 { columns: [$expr2, sum($expr1), lineitem_l_suppkey], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [2], vnode column idx: 0 } - Table 12 { columns: [$expr2, max(sum($expr1)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [], vnode column idx: 0 } - Table 4294967294 { columns: [s_suppkey, s_name, s_address, s_phone, total_revenue, lineitem.l_suppkey], primary key: [$0 ASC, $5 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [4] } + Table 0 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_address, supplier_s_phone, sum($expr1), lineitem_l_suppkey], primary key: [$4 ASC, $0 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [4], read pk prefix len hint: 1 } + Table 1 { columns: [sum($expr1), supplier_s_suppkey, lineitem_l_suppkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [max(max(sum($expr1)))], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [max(max(sum($expr1))), _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_address, supplier_s_phone], primary key: [$0 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [lineitem_l_suppkey, sum($expr1)], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [lineitem_l_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 8 { columns: [lineitem_l_suppkey, sum($expr1), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [max(sum($expr1)), $expr2], primary key: [$0 DESC, $1 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 10 { columns: [max(max(sum($expr1))), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 11 { columns: [$expr2, sum($expr1), lineitem_l_suppkey], primary key: [$0 ASC, $1 DESC, $2 ASC], value indices: [1, 2], distribution key: [2], read pk prefix len hint: 1, vnode column idx: 0 } + Table 12 { columns: [$expr2, max(sum($expr1)), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [], read pk prefix len hint: 1, vnode column idx: 0 } + Table 4294967294 { columns: [s_suppkey, s_name, s_address, s_phone, total_revenue, lineitem.l_suppkey], primary key: [$0 ASC, $5 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [4], read pk prefix len hint: 3 } - id: tpch_q16 before: - create_tables @@ -2680,7 +2680,7 @@ materialized table: 4294967294 StreamProject { exprs: [part.p_brand, part.p_type, part.p_size, count(distinct partsupp.ps_suppkey)] } StreamHashAgg { group_key: [part.p_brand, part.p_type, part.p_size], aggs: [count(distinct partsupp.ps_suppkey), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [(distinct key: partsupp.ps_suppkey, table id: 1)] StreamExchange Hash([0, 1, 2]) from 1 Fragment 1 @@ -2713,16 +2713,17 @@ Upstream BatchPlanNode - Table 0 { columns: [part_p_brand, part_p_type, part_p_size, count(distinct partsupp_ps_suppkey), count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3, 4], distribution key: [0, 1, 2] } - Table 2 { columns: [partsupp_ps_suppkey, part_p_brand, part_p_type, part_p_size, partsupp_ps_partkey, part_p_partkey], primary key: [$0 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [0] } - Table 3 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, part_p_partkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 4 { columns: [supplier_s_suppkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 5 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 6 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0] } - Table 7 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 8 { columns: [part_p_partkey, part_p_brand, part_p_type, part_p_size], primary key: [$0 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 9 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [p_brand, p_type, p_size, supplier_cnt], primary key: [$3 DESC, $0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2, 3], distribution key: [0, 1, 2] } + Table 0 { columns: [part_p_brand, part_p_type, part_p_size, count(distinct partsupp_ps_suppkey), count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3, 4], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 1 { columns: [part_p_brand, part_p_type, part_p_size, partsupp_ps_suppkey, count_for_agg_call_0], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1, 2], read pk prefix len hint: 0 } + Table 2 { columns: [partsupp_ps_suppkey, part_p_brand, part_p_type, part_p_size, partsupp_ps_partkey, part_p_partkey], primary key: [$0 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, part_p_partkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [supplier_s_suppkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 8 { columns: [part_p_partkey, part_p_brand, part_p_type, part_p_size], primary key: [$0 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [p_brand, p_type, p_size, supplier_cnt], primary key: [$3 DESC, $0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2, 3], distribution key: [0, 1, 2], read pk prefix len hint: 3 } - id: tpch_q17 before: - create_tables @@ -2827,7 +2828,7 @@ materialized table: 4294967294 StreamProject { exprs: [RoundDigit((sum(sum(lineitem.l_extendedprice)) / 7.0:Decimal), 16:Int32) as $expr2] } StreamGlobalSimpleAgg { aggs: [sum(sum(lineitem.l_extendedprice)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -2839,7 +2840,7 @@ StreamExchange Hash([2]) from 2 StreamProject { exprs: [part.p_partkey, (0.2:Decimal * (sum(lineitem.l_quantity) / count(lineitem.l_quantity))) as $expr1] } StreamHashAgg { group_key: [part.p_partkey], aggs: [sum(lineitem.l_quantity), count(lineitem.l_quantity), count] } - result table: 9, state tables: [] + result table: 9, state tables: [], distinct tables: [] StreamHashJoin { type: LeftOuter, predicate: part.p_partkey IS NOT DISTINCT FROM lineitem.l_partkey, output: [part.p_partkey, lineitem.l_quantity, lineitem.l_orderkey, lineitem.l_linenumber] } left table: 10, right table 12, left degree table: 11, right degree table: 13, StreamExchange Hash([0]) from 5 @@ -2866,7 +2867,7 @@ Fragment 5 StreamProject { exprs: [part.p_partkey] } StreamHashAgg { group_key: [part.p_partkey], aggs: [count] } - result table: 14, state tables: [] + result table: 14, state tables: [], distinct tables: [] StreamProject { exprs: [part.p_partkey] } StreamFilter { predicate: (part.p_brand = 'Brand#13':Varchar) AND (part.p_container = 'JUMBO PKG':Varchar) } Chain { table: part, columns: [part.p_partkey, part.p_brand, part.p_container], pk: [part.p_partkey], dist: UpstreamHashShard(part.p_partkey) } @@ -2879,22 +2880,22 @@ Upstream BatchPlanNode - Table 0 { columns: [sum(sum(lineitem_l_extendedprice)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 1 { columns: [lineitem_l_quantity, lineitem_l_extendedprice, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, lineitem_l_partkey], primary key: [$2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [2] } - Table 2 { columns: [part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, lineitem_l_partkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 3 { columns: [part_p_partkey, $expr1], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 4 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 5 { columns: [lineitem_l_partkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0] } - Table 6 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 7 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 8 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 9 { columns: [part_p_partkey, sum(lineitem_l_quantity), count(lineitem_l_quantity), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [0] } - Table 10 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 11 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 12 { columns: [lineitem_l_partkey, lineitem_l_quantity, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 13 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 14 { columns: [part_p_partkey, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [avg_yearly], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [sum(sum(lineitem_l_extendedprice)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [lineitem_l_quantity, lineitem_l_extendedprice, part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, lineitem_l_partkey], primary key: [$2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [2], read pk prefix len hint: 1 } + Table 2 { columns: [part_p_partkey, lineitem_l_orderkey, lineitem_l_linenumber, lineitem_l_partkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [part_p_partkey, $expr1], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [lineitem_l_partkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 8 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [part_p_partkey, sum(lineitem_l_quantity), count(lineitem_l_quantity), count], primary key: [$0 ASC], value indices: [1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 10 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 11 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 12 { columns: [lineitem_l_partkey, lineitem_l_quantity, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 13 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 14 { columns: [part_p_partkey, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [avg_yearly], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: tpch_q18 before: - create_tables @@ -3023,7 +3024,7 @@ StreamProject { exprs: [customer.c_name, customer.c_custkey, orders.o_orderkey, orders.o_orderdate, orders.o_totalprice, sum(lineitem.l_quantity), Vnode(orders.o_orderkey) as $expr1] } StreamProject { exprs: [customer.c_name, customer.c_custkey, orders.o_orderkey, orders.o_orderdate, orders.o_totalprice, sum(lineitem.l_quantity)] } StreamHashAgg { group_key: [customer.c_name, customer.c_custkey, orders.o_orderkey, orders.o_orderdate, orders.o_totalprice], aggs: [sum(lineitem.l_quantity), count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamHashJoin { type: LeftSemi, predicate: orders.o_orderkey = lineitem.l_orderkey, output: [customer.c_name, customer.c_custkey, orders.o_orderkey, orders.o_orderdate, orders.o_totalprice, lineitem.l_quantity, lineitem.l_orderkey, lineitem.l_linenumber] } left table: 3, right table 5, left degree table: 4, right degree table: 6, StreamHashJoin { type: Inner, predicate: orders.o_orderkey = lineitem.l_orderkey, output: [customer.c_custkey, customer.c_name, orders.o_orderkey, orders.o_totalprice, orders.o_orderdate, lineitem.l_quantity, lineitem.l_orderkey, lineitem.l_linenumber] } @@ -3034,7 +3035,7 @@ StreamFilter { predicate: (sum(lineitem.l_quantity) > 1:Int32) } StreamProject { exprs: [lineitem.l_orderkey, sum(lineitem.l_quantity)] } StreamHashAgg { group_key: [lineitem.l_orderkey], aggs: [sum(lineitem.l_quantity), count] } - result table: 15, state tables: [] + result table: 15, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 6 Fragment 2 @@ -3063,23 +3064,23 @@ Upstream BatchPlanNode - Table 0 { columns: [customer_c_name, customer_c_custkey, orders_o_orderkey, orders_o_orderdate, orders_o_totalprice, sum(lineitem_l_quantity), $expr1], primary key: [$4 DESC, $3 ASC, $0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [] } - Table 1 { columns: [customer_c_name, customer_c_custkey, orders_o_orderkey, orders_o_orderdate, orders_o_totalprice, sum(lineitem_l_quantity), $expr1], primary key: [$6 ASC, $4 DESC, $3 ASC, $0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [2], vnode column idx: 6 } - Table 2 { columns: [customer_c_name, customer_c_custkey, orders_o_orderkey, orders_o_orderdate, orders_o_totalprice, sum(lineitem_l_quantity), count], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [5, 6], distribution key: [2] } - Table 3 { columns: [customer_c_custkey, customer_c_name, orders_o_orderkey, orders_o_totalprice, orders_o_orderdate, lineitem_l_quantity, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$2 ASC, $0 ASC, $6 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [2] } - Table 4 { columns: [orders_o_orderkey, customer_c_custkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 5 { columns: [lineitem_l_orderkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 6 { columns: [lineitem_l_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 7 { columns: [customer_c_custkey, customer_c_name, orders_o_orderkey, orders_o_totalprice, orders_o_orderdate], primary key: [$2 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2] } - Table 8 { columns: [orders_o_orderkey, customer_c_custkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 9 { columns: [lineitem_l_orderkey, lineitem_l_quantity, lineitem_l_linenumber], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 10 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 11 { columns: [customer_c_custkey, customer_c_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0] } - Table 12 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 13 { columns: [orders_o_orderkey, orders_o_custkey, orders_o_totalprice, orders_o_orderdate], primary key: [$1 ASC, $0 ASC], value indices: [0, 1, 2, 3], distribution key: [1] } - Table 14 { columns: [orders_o_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 15 { columns: [lineitem_l_orderkey, sum(lineitem_l_quantity), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0] } - Table 4294967294 { columns: [c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, quantity], primary key: [$4 DESC, $3 ASC, $0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [] } + Table 0 { columns: [customer_c_name, customer_c_custkey, orders_o_orderkey, orders_o_orderdate, orders_o_totalprice, sum(lineitem_l_quantity), $expr1], primary key: [$4 DESC, $3 ASC, $0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [customer_c_name, customer_c_custkey, orders_o_orderkey, orders_o_orderdate, orders_o_totalprice, sum(lineitem_l_quantity), $expr1], primary key: [$6 ASC, $4 DESC, $3 ASC, $0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [2], read pk prefix len hint: 1, vnode column idx: 6 } + Table 2 { columns: [customer_c_name, customer_c_custkey, orders_o_orderkey, orders_o_orderdate, orders_o_totalprice, sum(lineitem_l_quantity), count], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [5, 6], distribution key: [2], read pk prefix len hint: 5 } + Table 3 { columns: [customer_c_custkey, customer_c_name, orders_o_orderkey, orders_o_totalprice, orders_o_orderdate, lineitem_l_quantity, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$2 ASC, $0 ASC, $6 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [2], read pk prefix len hint: 1 } + Table 4 { columns: [orders_o_orderkey, customer_c_custkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [lineitem_l_orderkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [lineitem_l_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [customer_c_custkey, customer_c_name, orders_o_orderkey, orders_o_totalprice, orders_o_orderdate], primary key: [$2 ASC, $0 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2], read pk prefix len hint: 1 } + Table 8 { columns: [orders_o_orderkey, customer_c_custkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [lineitem_l_orderkey, lineitem_l_quantity, lineitem_l_linenumber], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 10 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 11 { columns: [customer_c_custkey, customer_c_name], primary key: [$0 ASC], value indices: [0, 1], distribution key: [0], read pk prefix len hint: 1 } + Table 12 { columns: [customer_c_custkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 13 { columns: [orders_o_orderkey, orders_o_custkey, orders_o_totalprice, orders_o_orderdate], primary key: [$1 ASC, $0 ASC], value indices: [0, 1, 2, 3], distribution key: [1], read pk prefix len hint: 1 } + Table 14 { columns: [orders_o_custkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 15 { columns: [lineitem_l_orderkey, sum(lineitem_l_quantity), count], primary key: [$0 ASC], value indices: [1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice, quantity], primary key: [$4 DESC, $3 ASC, $0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [], read pk prefix len hint: 5 } - id: tpch_q19 before: - create_tables @@ -3165,7 +3166,7 @@ materialized table: 4294967294 StreamProject { exprs: [sum(sum($expr1))] } StreamGlobalSimpleAgg { aggs: [sum(sum($expr1)), count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Single from 1 Fragment 1 @@ -3190,12 +3191,12 @@ Upstream BatchPlanNode - Table 0 { columns: [sum(sum($expr1)), count], primary key: [], value indices: [0, 1], distribution key: [] } - Table 1 { columns: [lineitem_l_partkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [0] } - Table 2 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 3 { columns: [part_p_partkey, part_p_brand, part_p_size, part_p_container], primary key: [$0 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 4 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 4294967294 { columns: [revenue], primary key: [], value indices: [0], distribution key: [] } + Table 0 { columns: [sum(sum($expr1)), count], primary key: [], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [lineitem_l_partkey, lineitem_l_quantity, lineitem_l_extendedprice, lineitem_l_discount, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [lineitem_l_partkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [part_p_partkey, part_p_brand, part_p_size, part_p_container], primary key: [$0 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [revenue], primary key: [], value indices: [0], distribution key: [], read pk prefix len hint: 0 } - id: tpch_q20 before: - create_tables @@ -3368,7 +3369,7 @@ StreamExchange Hash([0, 1]) from 5 StreamProject { exprs: [partsupp.ps_partkey, partsupp.ps_suppkey, (0.5:Decimal * sum(lineitem.l_quantity)) as $expr2] } StreamHashAgg { group_key: [partsupp.ps_partkey, partsupp.ps_suppkey], aggs: [sum(lineitem.l_quantity), count] } - result table: 16, state tables: [] + result table: 16, state tables: [], distinct tables: [] StreamHashJoin { type: LeftOuter, predicate: partsupp.ps_partkey IS NOT DISTINCT FROM lineitem.l_partkey AND partsupp.ps_suppkey IS NOT DISTINCT FROM lineitem.l_suppkey, output: [partsupp.ps_partkey, partsupp.ps_suppkey, lineitem.l_quantity, lineitem.l_orderkey, lineitem.l_linenumber] } left table: 17, right table 19, left degree table: 18, right degree table: 20, StreamExchange Hash([0, 1]) from 8 @@ -3396,7 +3397,7 @@ Fragment 8 StreamProject { exprs: [partsupp.ps_partkey, partsupp.ps_suppkey] } StreamHashAgg { group_key: [partsupp.ps_partkey, partsupp.ps_suppkey], aggs: [count] } - result table: 21, state tables: [] + result table: 21, state tables: [], distinct tables: [] Chain { table: partsupp, columns: [partsupp.ps_partkey, partsupp.ps_suppkey], pk: [partsupp.ps_partkey, partsupp.ps_suppkey], dist: UpstreamHashShard(partsupp.ps_partkey, partsupp.ps_suppkey) } Upstream BatchPlanNode @@ -3408,29 +3409,29 @@ Upstream BatchPlanNode - Table 0 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_address, supplier_s_nationkey, nation_n_nationkey], primary key: [$0 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0] } - Table 1 { columns: [supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 2 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, partsupp_ps_partkey_0, partsupp_ps_suppkey_0], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0] } - Table 3 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, partsupp_ps_partkey_0, partsupp_ps_suppkey_0, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 4 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_address, supplier_s_nationkey], primary key: [$3 ASC, $0 ASC], value indices: [0, 1, 2, 3], distribution key: [3] } - Table 5 { columns: [supplier_s_nationkey, supplier_s_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 6 { columns: [nation_n_nationkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 7 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 8 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, $expr1], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0, 1] } - Table 9 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1] } - Table 10 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, $expr2], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0, 1] } - Table 11 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1] } - Table 12 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, partsupp_ps_availqty], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 13 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 14 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 15 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 16 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, sum(lineitem_l_quantity), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0, 1] } - Table 17 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0, 1] } - Table 18 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1] } - Table 19 { columns: [lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_quantity, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $1 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0, 1] } - Table 20 { columns: [lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1] } - Table 21 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1] } - Table 4294967294 { columns: [s_name, s_address, supplier.s_suppkey, nation.n_nationkey, supplier.s_nationkey], primary key: [$0 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2] } + Table 0 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_address, supplier_s_nationkey, nation_n_nationkey], primary key: [$0 ASC, $4 ASC, $3 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0], read pk prefix len hint: 1 } + Table 1 { columns: [supplier_s_suppkey, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 2 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, partsupp_ps_partkey_0, partsupp_ps_suppkey_0], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [0, 1, 2, 3], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [partsupp_ps_suppkey, partsupp_ps_partkey, partsupp_ps_partkey_0, partsupp_ps_suppkey_0, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 1 } + Table 4 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_address, supplier_s_nationkey], primary key: [$3 ASC, $0 ASC], value indices: [0, 1, 2, 3], distribution key: [3], read pk prefix len hint: 1 } + Table 5 { columns: [supplier_s_nationkey, supplier_s_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [nation_n_nationkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 8 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, $expr1], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 9 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 10 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, $expr2], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 11 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 12 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, partsupp_ps_availqty], primary key: [$0 ASC, $1 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 13 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 14 { columns: [part_p_partkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 15 { columns: [part_p_partkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 16 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, sum(lineitem_l_quantity), count], primary key: [$0 ASC, $1 ASC], value indices: [2, 3], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 17 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey], primary key: [$0 ASC, $1 ASC], value indices: [0, 1], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 18 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 19 { columns: [lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_quantity, lineitem_l_orderkey, lineitem_l_linenumber], primary key: [$0 ASC, $1 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 20 { columns: [lineitem_l_partkey, lineitem_l_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 21 { columns: [partsupp_ps_partkey, partsupp_ps_suppkey, count], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0, 1], read pk prefix len hint: 2 } + Table 4294967294 { columns: [s_name, s_address, supplier.s_suppkey, nation.n_nationkey, supplier.s_nationkey], primary key: [$0 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [0, 1, 2, 3, 4], distribution key: [2], read pk prefix len hint: 3 } - id: tpch_q21 before: - create_tables @@ -3586,7 +3587,7 @@ state table: 1 StreamProject { exprs: [supplier.s_name, count, Vnode(supplier.s_name) as $expr1] } StreamHashAgg { group_key: [supplier.s_name], aggs: [count] } - result table: 2, state tables: [] + result table: 2, state tables: [], distinct tables: [] StreamExchange Hash([0]) from 2 Fragment 2 @@ -3651,30 +3652,30 @@ Upstream BatchPlanNode - Table 0 { columns: [supplier_s_name, count, $expr1], primary key: [$1 DESC, $0 ASC], value indices: [0, 1, 2], distribution key: [] } - Table 1 { columns: [supplier_s_name, count, $expr1], primary key: [$2 ASC, $1 DESC, $0 ASC], value indices: [0, 1, 2], distribution key: [0], vnode column idx: 2 } - Table 2 { columns: [supplier_s_name, count], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 3 { columns: [supplier_s_name, lineitem_l_orderkey, lineitem_l_suppkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey], primary key: [$1 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [1] } - Table 4 { columns: [lineitem_l_orderkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [6], distribution key: [0] } - Table 5 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_linenumber], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 6 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 7 { columns: [supplier_s_name, lineitem_l_orderkey, lineitem_l_suppkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey], primary key: [$1 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [1] } - Table 8 { columns: [lineitem_l_orderkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [6], distribution key: [0] } - Table 9 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_linenumber], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 10 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0] } - Table 11 { columns: [supplier_s_name, lineitem_l_orderkey, lineitem_l_suppkey, supplier_s_suppkey, lineitem_l_linenumber, supplier_s_nationkey, nation_n_nationkey], primary key: [$1 ASC, $3 ASC, $4 ASC, $6 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [1] } - Table 12 { columns: [lineitem_l_orderkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [5], distribution key: [0] } - Table 13 { columns: [orders_o_orderkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 14 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 15 { columns: [supplier_s_name, supplier_s_nationkey, lineitem_l_orderkey, lineitem_l_suppkey, supplier_s_suppkey, lineitem_l_linenumber], primary key: [$1 ASC, $4 ASC, $2 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1] } - Table 16 { columns: [supplier_s_nationkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0] } - Table 17 { columns: [nation_n_nationkey], primary key: [$0 ASC], value indices: [0], distribution key: [0] } - Table 18 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 19 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0] } - Table 20 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0] } - Table 21 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_linenumber], primary key: [$1 ASC, $0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1] } - Table 22 { columns: [lineitem_l_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0] } - Table 4294967294 { columns: [s_name, numwait], primary key: [$1 DESC, $0 ASC], value indices: [0, 1], distribution key: [] } + Table 0 { columns: [supplier_s_name, count, $expr1], primary key: [$1 DESC, $0 ASC], value indices: [0, 1, 2], distribution key: [], read pk prefix len hint: 0 } + Table 1 { columns: [supplier_s_name, count, $expr1], primary key: [$2 ASC, $1 DESC, $0 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1, vnode column idx: 2 } + Table 2 { columns: [supplier_s_name, count], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 3 { columns: [supplier_s_name, lineitem_l_orderkey, lineitem_l_suppkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey], primary key: [$1 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [1], read pk prefix len hint: 1 } + Table 4 { columns: [lineitem_l_orderkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [6], distribution key: [0], read pk prefix len hint: 1 } + Table 5 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_linenumber], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 6 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 7 { columns: [supplier_s_name, lineitem_l_orderkey, lineitem_l_suppkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey], primary key: [$1 ASC, $3 ASC, $4 ASC, $5 ASC, $6 ASC, $7 ASC], value indices: [0, 1, 2, 3, 4, 5, 6, 7], distribution key: [1], read pk prefix len hint: 1 } + Table 8 { columns: [lineitem_l_orderkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, orders_o_orderkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC, $5 ASC], value indices: [6], distribution key: [0], read pk prefix len hint: 1 } + Table 9 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_linenumber], primary key: [$0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 10 { columns: [lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC], value indices: [2], distribution key: [0], read pk prefix len hint: 1 } + Table 11 { columns: [supplier_s_name, lineitem_l_orderkey, lineitem_l_suppkey, supplier_s_suppkey, lineitem_l_linenumber, supplier_s_nationkey, nation_n_nationkey], primary key: [$1 ASC, $3 ASC, $4 ASC, $6 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5, 6], distribution key: [1], read pk prefix len hint: 1 } + Table 12 { columns: [lineitem_l_orderkey, supplier_s_suppkey, lineitem_l_linenumber, nation_n_nationkey, supplier_s_nationkey, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC, $4 ASC], value indices: [5], distribution key: [0], read pk prefix len hint: 1 } + Table 13 { columns: [orders_o_orderkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 14 { columns: [orders_o_orderkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 15 { columns: [supplier_s_name, supplier_s_nationkey, lineitem_l_orderkey, lineitem_l_suppkey, supplier_s_suppkey, lineitem_l_linenumber], primary key: [$1 ASC, $4 ASC, $2 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [1], read pk prefix len hint: 1 } + Table 16 { columns: [supplier_s_nationkey, supplier_s_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC, $3 ASC], value indices: [4], distribution key: [0], read pk prefix len hint: 1 } + Table 17 { columns: [nation_n_nationkey], primary key: [$0 ASC], value indices: [0], distribution key: [0], read pk prefix len hint: 1 } + Table 18 { columns: [nation_n_nationkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 19 { columns: [supplier_s_suppkey, supplier_s_name, supplier_s_nationkey], primary key: [$0 ASC], value indices: [0, 1, 2], distribution key: [0], read pk prefix len hint: 1 } + Table 20 { columns: [supplier_s_suppkey, _degree], primary key: [$0 ASC], value indices: [1], distribution key: [0], read pk prefix len hint: 1 } + Table 21 { columns: [lineitem_l_orderkey, lineitem_l_suppkey, lineitem_l_linenumber], primary key: [$1 ASC, $0 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [1], read pk prefix len hint: 1 } + Table 22 { columns: [lineitem_l_suppkey, lineitem_l_orderkey, lineitem_l_linenumber, _degree], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0], read pk prefix len hint: 1 } + Table 4294967294 { columns: [s_name, numwait], primary key: [$1 DESC, $0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 1 } - id: tpch_q22 before: - create_tables diff --git a/src/frontend/planner_test/tests/testdata/union.yaml b/src/frontend/planner_test/tests/testdata/union.yaml index 07bce42612205..0dfee81d93421 100644 --- a/src/frontend/planner_test/tests/testdata/union.yaml +++ b/src/frontend/planner_test/tests/testdata/union.yaml @@ -38,7 +38,7 @@ Upstream BatchPlanNode - Table 4294967294 { columns: [a, b, c, t1._row_id, null:Int64, 0:Int32], primary key: [$3 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [3, 4, 5] } + Table 4294967294 { columns: [a, b, c, t1._row_id, null:Int64, 0:Int32], primary key: [$3 ASC, $4 ASC, $5 ASC], value indices: [0, 1, 2, 3, 4, 5], distribution key: [3, 4, 5], read pk prefix len hint: 3 } - sql: | create table t1 (a int, b numeric, c bigint); create table t2 (a int, b numeric, c bigint); @@ -75,7 +75,7 @@ materialized table: 4294967294 StreamProject { exprs: [t1.a, t1.b, t1.c] } StreamHashAgg { group_key: [t1.a, t1.b, t1.c], aggs: [count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0, 1, 2]) from 1 Fragment 1 @@ -95,8 +95,8 @@ Upstream BatchPlanNode - Table 0 { columns: [t1_a, t1_b, t1_c, count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2] } - Table 4294967294 { columns: [a, b, c], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0, 1, 2] } + Table 0 { columns: [t1_a, t1_b, t1_c, count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 4294967294 { columns: [a, b, c], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0, 1, 2], read pk prefix len hint: 3 } - sql: | create table t1 (a int, b numeric, c bigint, primary key(a)); create table t2 (a int, b numeric, c bigint, primary key(a)); @@ -133,7 +133,7 @@ materialized table: 4294967294 StreamProject { exprs: [t1.a, t1.b, t1.c] } StreamHashAgg { group_key: [t1.a, t1.b, t1.c], aggs: [count] } - result table: 0, state tables: [] + result table: 0, state tables: [], distinct tables: [] StreamExchange Hash([0, 1, 2]) from 1 Fragment 1 @@ -153,8 +153,8 @@ Upstream BatchPlanNode - Table 0 { columns: [t1_a, t1_b, t1_c, count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2] } - Table 4294967294 { columns: [a, b, c], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0, 1, 2] } + Table 0 { columns: [t1_a, t1_b, t1_c, count], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [3], distribution key: [0, 1, 2], read pk prefix len hint: 3 } + Table 4294967294 { columns: [a, b, c], primary key: [$0 ASC, $1 ASC, $2 ASC], value indices: [0, 1, 2], distribution key: [0, 1, 2], read pk prefix len hint: 3 } - sql: | create table t1 (a int, b numeric, c bigint); create table t2 (a int, b numeric, c bigint); diff --git a/src/frontend/planner_test/tests/testdata/watermark.yaml b/src/frontend/planner_test/tests/testdata/watermark.yaml index 2061f57842c02..308c848e7f80a 100644 --- a/src/frontend/planner_test/tests/testdata/watermark.yaml +++ b/src/frontend/planner_test/tests/testdata/watermark.yaml @@ -13,6 +13,21 @@ └─StreamRowIdGen { row_id_index: 1 } └─StreamWatermarkFilter { watermark_descs: [idx: 0, expr: (v1 - '00:00:01':Interval)] } └─StreamSource { source: "t", columns: ["v1", "_row_id"] } + stream_dist_plan: | + Fragment 0 + StreamMaterialize { columns: [v1, _row_id(hidden)], pk_columns: [_row_id], pk_conflict: "no check", watermark_columns: [v1] } + materialized table: 4294967294 + StreamExchange Hash([1]) from 1 + + Fragment 1 + StreamProject { exprs: [(AtTimeZone((AtTimeZone(v1, 'UTC':Varchar) - '00:00:00':Interval), 'UTC':Varchar) - '00:00:02':Interval) as $expr1, _row_id], output_watermarks: [$expr1] } + StreamRowIdGen { row_id_index: 1 } + StreamWatermarkFilter { watermark_descs: [idx: 0, expr: (v1 - '00:00:01':Interval)] } + StreamSource { source: "t", columns: ["v1", "_row_id"] } + source state table: 1 + + Table 1 { columns: [partition_id, offset], primary key: [$0 ASC], value indices: [0, 1], distribution key: [], read pk prefix len hint: 0 } + Table 4294967294 { columns: [v1, _row_id], primary key: [$1 ASC], value indices: [0, 1], distribution key: [1], read pk prefix len hint: 1 } - name: watermark on append only table with source sql: | explain create table t (v1 timestamp with time zone, watermark for v1 as v1 - INTERVAL '1' SECOND) append only with (connector = 'kafka', kafka.topic = 'kafka_3_partition_topic', kafka.brokers = '127.0.0.1:1234', kafka.scan.startup.mode='earliest') ROW FORMAT JSON; diff --git a/src/frontend/src/optimizer/plan_node/stream_global_simple_agg.rs b/src/frontend/src/optimizer/plan_node/stream_global_simple_agg.rs index f64e9bdb192a5..b31e714141e6e 100644 --- a/src/frontend/src/optimizer/plan_node/stream_global_simple_agg.rs +++ b/src/frontend/src/optimizer/plan_node/stream_global_simple_agg.rs @@ -15,6 +15,7 @@ use std::fmt; use fixedbitset::FixedBitSet; +use itertools::Itertools; use risingwave_pb::stream_plan::stream_node::NodeBody as ProstStreamNode; use super::generic::PlanAggCall; @@ -131,6 +132,7 @@ impl StreamNode for StreamGlobalSimpleAgg { ), distinct_dedup_tables: distinct_dedup_tables .into_iter() + .sorted_by_key(|(i, _)| *i) .map(|(key_idx, table)| { ( key_idx as u32, diff --git a/src/frontend/src/optimizer/plan_node/stream_hash_agg.rs b/src/frontend/src/optimizer/plan_node/stream_hash_agg.rs index 1bee4b859a998..5f679432a855d 100644 --- a/src/frontend/src/optimizer/plan_node/stream_hash_agg.rs +++ b/src/frontend/src/optimizer/plan_node/stream_hash_agg.rs @@ -164,6 +164,7 @@ impl StreamNode for StreamHashAgg { ), distinct_dedup_tables: distinct_dedup_tables .into_iter() + .sorted_by_key(|(i, _)| *i) .map(|(key_idx, table)| { ( key_idx as u32, diff --git a/src/frontend/src/utils/stream_graph_formatter.rs b/src/frontend/src/utils/stream_graph_formatter.rs index 54c8140ae4d8e..b99d4f1c6a8f9 100644 --- a/src/frontend/src/utils/stream_graph_formatter.rs +++ b/src/frontend/src/utils/stream_graph_formatter.rs @@ -81,7 +81,7 @@ impl StreamGraphFormatter { let tb = TableCatalog::from(tb.clone()); writeln!( f, - " Table {} {{ columns: [{}], primary key: {:?}, value indices: {:?}, distribution key: {:?}{} }}", + " Table {} {{ columns: [{}], primary key: {:?}, value indices: {:?}, distribution key: {:?}, read pk prefix len hint: {:?}{} }}", tb.id, tb.columns .iter() @@ -96,6 +96,7 @@ impl StreamGraphFormatter { tb.pk, tb.value_indices, tb.distribution_key, + tb.read_prefix_len_hint, if let Some(vnode_col_idx) = tb.vnode_col_index { format!(", vnode column idx: {}", vnode_col_idx) } else { @@ -139,23 +140,26 @@ impl StreamGraphFormatter { } _ => node.identity.clone(), }; + writeln!(f, "{}{}", " ".repeat(level * 2), one_line_explain)?; - let explain_table_oneline = - match node.get_node_body().unwrap() { - stream_node::NodeBody::Source(node) => node.source_inner.as_ref().map(|source| { - format!( - "source state table: {}", - self.add_table(source.get_state_table().unwrap()) - ) - }), - stream_node::NodeBody::Materialize(node) => Some(format!( - "materialized table: {}", - self.add_table(node.get_table().unwrap()) - )), - stream_node::NodeBody::GlobalSimpleAgg(node) => Some(format!( - "result table: {}, state tables: [{}]", - self.add_table(node.get_result_table().unwrap()), - node.agg_call_states + let explain_table_oneline = match node.get_node_body().unwrap() { + stream_node::NodeBody::Source(node) => node.source_inner.as_ref().map(|source| { + format!( + "source state table: {}", + self.add_table(source.get_state_table().unwrap()) + ) + }), + stream_node::NodeBody::Materialize(node) => Some(format!( + "materialized table: {}", + self.add_table(node.get_table().unwrap()) + )), + stream_node::NodeBody::GlobalSimpleAgg(inner) => { + let in_fields = &node.get_input()[0].fields; + Some(format!( + "result table: {}, state tables: [{}], distinct tables: [{}]", + self.add_table(inner.get_result_table().unwrap()), + inner + .agg_call_states .iter() .filter_map(|state| match state.get_inner().unwrap() { agg_call_state::Inner::ResultValueState(_) => None, @@ -164,12 +168,26 @@ impl StreamGraphFormatter { MaterializedInputState { table, .. }, ) => Some(self.add_table(table.as_ref().unwrap())), }) - .join(", ") - )), - stream_node::NodeBody::HashAgg(node) => Some(format!( - "result table: {}, state tables: [{}]", - self.add_table(node.get_result_table().unwrap()), - node.agg_call_states + .join(", "), + inner + .get_distinct_dedup_tables() + .iter() + .sorted_by_key(|(i, _)| *i) + .map(|(i, table)| format!( + "(distinct key: {}, table id: {})", + in_fields[*i as usize].name, + self.add_table(table) + )) + .join(", "), + )) + } + stream_node::NodeBody::HashAgg(inner) => { + let in_fields = &node.get_input()[0].fields; + Some(format!( + "result table: {}, state tables: [{}], distinct tables: [{}]", + self.add_table(inner.get_result_table().unwrap()), + inner + .agg_call_states .iter() .filter_map(|state| match state.get_inner().unwrap() { agg_call_state::Inner::ResultValueState(_) => None, @@ -178,52 +196,63 @@ impl StreamGraphFormatter { MaterializedInputState { table, .. }, ) => Some(self.add_table(table.as_ref().unwrap())), }) - .join(", ") - )), - stream_node::NodeBody::HashJoin(node) => Some(format!( - "left table: {}, right table {},{}{}", - self.add_table(node.get_left_table().unwrap()), - self.add_table(node.get_right_table().unwrap()), - match &node.left_degree_table { - Some(tb) => format!(" left degree table: {},", self.add_table(tb)), - None => "".to_string(), - }, - match &node.right_degree_table { - Some(tb) => format!(" right degree table: {},", self.add_table(tb)), - None => "".to_string(), - }, - )), - stream_node::NodeBody::TopN(node) => Some(format!( - "state table: {}", - self.add_table(node.get_table().unwrap()) - )), - stream_node::NodeBody::AppendOnlyTopN(node) => Some(format!( - "state table: {}", - self.add_table(node.get_table().unwrap()) - )), - stream_node::NodeBody::Arrange(node) => Some(format!( - "arrange table: {}", - self.add_table(node.get_table().unwrap()) - )), - stream_node::NodeBody::DynamicFilter(node) => Some(format!( - "left table: {}, right table {}", - self.add_table(node.get_left_table().unwrap()), - self.add_table(node.get_right_table().unwrap()), - )), - stream_node::NodeBody::GroupTopN(node) => Some(format!( - "state table: {}", - self.add_table(node.get_table().unwrap()) - )), - stream_node::NodeBody::AppendOnlyGroupTopN(node) => Some(format!( - "state table: {}", - self.add_table(node.get_table().unwrap()) - )), - stream_node::NodeBody::Now(node) => Some(format!( - "state table: {}", - self.add_table(node.get_state_table().unwrap()) - )), - _ => None, - }; + .join(", "), + inner + .get_distinct_dedup_tables() + .iter() + .sorted_by_key(|(i, _)| *i) + .map(|(i, table)| format!( + "(distinct key: {}, table id: {})", + in_fields[*i as usize].name, + self.add_table(table) + )) + .join(", "), + )) + } + stream_node::NodeBody::HashJoin(node) => Some(format!( + "left table: {}, right table {},{}{}", + self.add_table(node.get_left_table().unwrap()), + self.add_table(node.get_right_table().unwrap()), + match &node.left_degree_table { + Some(tb) => format!(" left degree table: {},", self.add_table(tb)), + None => "".to_string(), + }, + match &node.right_degree_table { + Some(tb) => format!(" right degree table: {},", self.add_table(tb)), + None => "".to_string(), + }, + )), + stream_node::NodeBody::TopN(node) => Some(format!( + "state table: {}", + self.add_table(node.get_table().unwrap()) + )), + stream_node::NodeBody::AppendOnlyTopN(node) => Some(format!( + "state table: {}", + self.add_table(node.get_table().unwrap()) + )), + stream_node::NodeBody::Arrange(node) => Some(format!( + "arrange table: {}", + self.add_table(node.get_table().unwrap()) + )), + stream_node::NodeBody::DynamicFilter(node) => Some(format!( + "left table: {}, right table {}", + self.add_table(node.get_left_table().unwrap()), + self.add_table(node.get_right_table().unwrap()), + )), + stream_node::NodeBody::GroupTopN(node) => Some(format!( + "state table: {}", + self.add_table(node.get_table().unwrap()) + )), + stream_node::NodeBody::AppendOnlyGroupTopN(node) => Some(format!( + "state table: {}", + self.add_table(node.get_table().unwrap()) + )), + stream_node::NodeBody::Now(node) => Some(format!( + "state table: {}", + self.add_table(node.get_state_table().unwrap()) + )), + _ => None, + }; if let Some(explain_table_oneline) = explain_table_oneline { writeln!(f, "{}{}", " ".repeat(level * 2 + 4), explain_table_oneline)?; }