|
577 | 577 | └─StreamGlobalSimpleAgg { aggs: [max(max($expr1) filter((t.a < t.b) AND ((t.a + t.b) < 100:Int32) AND ((t.a * t.b) <> ((t.a + t.b) - 1:Int32)))), count] }
|
578 | 578 | └─StreamExchange { dist: Single }
|
579 | 579 | └─StreamHashAgg { group_key: [$expr2], aggs: [max($expr1) filter((t.a < t.b) AND ((t.a + t.b) < 100:Int32) AND ((t.a * t.b) <> ((t.a + t.b) - 1:Int32))), count] }
|
580 |
| - └─StreamProject { exprs: [t.a, t.b, $expr1, t._row_id, Vnode(t._row_id) as $expr2] } |
581 |
| - └─StreamProject { exprs: [t.a, t.b, (t.a * t.b) as $expr1, t._row_id] } |
582 |
| - └─StreamTableScan { table: t, columns: [t.a, t.b, t._row_id], pk: [t._row_id], dist: UpstreamHashShard(t._row_id) } |
| 580 | + └─StreamProject { exprs: [t.a, t.b, (t.a * t.b) as $expr1, t._row_id, Vnode(t._row_id) as $expr2] } |
| 581 | + └─StreamTableScan { table: t, columns: [t.a, t.b, t._row_id], pk: [t._row_id], dist: UpstreamHashShard(t._row_id) } |
583 | 582 | - name: avg filter clause + group by
|
584 | 583 | sql: |
|
585 | 584 | create table t(a int, b int);
|
|
1139 | 1138 | └─StreamExchange { dist: HashShard(lineitem.l_commitdate) }
|
1140 | 1139 | └─StreamHashAgg { group_key: [lineitem.l_commitdate, $expr1], aggs: [max(lineitem.l_commitdate), count] }
|
1141 | 1140 | └─StreamProject { exprs: [lineitem.l_tax, lineitem.l_shipinstruct, lineitem.l_orderkey, lineitem.l_commitdate, Vnode(lineitem.l_orderkey) as $expr1] }
|
1142 |
| - └─StreamProject { exprs: [lineitem.l_tax, lineitem.l_shipinstruct, lineitem.l_orderkey, lineitem.l_commitdate] } |
1143 |
| - └─StreamHashAgg { group_key: [lineitem.l_tax, lineitem.l_shipinstruct, lineitem.l_orderkey, lineitem.l_commitdate], aggs: [count] } |
1144 |
| - └─StreamTableScan { table: lineitem, columns: [lineitem.l_orderkey, lineitem.l_tax, lineitem.l_commitdate, lineitem.l_shipinstruct], pk: [lineitem.l_orderkey], dist: UpstreamHashShard(lineitem.l_orderkey) } |
| 1141 | + └─StreamHashAgg { group_key: [lineitem.l_tax, lineitem.l_shipinstruct, lineitem.l_orderkey, lineitem.l_commitdate], aggs: [count] } |
| 1142 | + └─StreamTableScan { table: lineitem, columns: [lineitem.l_orderkey, lineitem.l_tax, lineitem.l_commitdate, lineitem.l_shipinstruct], pk: [lineitem.l_orderkey], dist: UpstreamHashShard(lineitem.l_orderkey) } |
1145 | 1143 | - name: two phase agg on hop window input should use two phase agg
|
1146 | 1144 | sql: |
|
1147 | 1145 | SET QUERY_MODE TO DISTRIBUTED;
|
|
1180 | 1178 | └─StreamExchange { dist: HashShard(window_start) }
|
1181 | 1179 | └─StreamHashAgg { group_key: [window_start, $expr2], aggs: [max(sum0(count)), count] }
|
1182 | 1180 | └─StreamProject { exprs: [bid.auction, window_start, sum0(count), Vnode(bid.auction, window_start) as $expr2] }
|
1183 |
| - └─StreamProject { exprs: [bid.auction, window_start, sum0(count)] } |
1184 |
| - └─StreamHashAgg { group_key: [bid.auction, window_start], aggs: [sum0(count), count] } |
1185 |
| - └─StreamExchange { dist: HashShard(bid.auction, window_start) } |
1186 |
| - └─StreamHashAgg { group_key: [bid.auction, window_start, $expr1], aggs: [count] } |
1187 |
| - └─StreamProject { exprs: [bid.auction, window_start, bid._row_id, Vnode(bid._row_id) as $expr1] } |
1188 |
| - └─StreamHopWindow { time_col: bid.date_time, slide: 00:00:02, size: 00:00:10, output: [bid.auction, window_start, bid._row_id] } |
1189 |
| - └─StreamFilter { predicate: IsNotNull(bid.date_time) } |
1190 |
| - └─StreamTableScan { table: bid, columns: [bid.date_time, bid.auction, bid._row_id], pk: [bid._row_id], dist: UpstreamHashShard(bid._row_id) } |
| 1181 | + └─StreamHashAgg { group_key: [bid.auction, window_start], aggs: [sum0(count), count] } |
| 1182 | + └─StreamExchange { dist: HashShard(bid.auction, window_start) } |
| 1183 | + └─StreamHashAgg { group_key: [bid.auction, window_start, $expr1], aggs: [count] } |
| 1184 | + └─StreamProject { exprs: [bid.auction, window_start, bid._row_id, Vnode(bid._row_id) as $expr1] } |
| 1185 | + └─StreamHopWindow { time_col: bid.date_time, slide: 00:00:02, size: 00:00:10, output: [bid.auction, window_start, bid._row_id] } |
| 1186 | + └─StreamFilter { predicate: IsNotNull(bid.date_time) } |
| 1187 | + └─StreamTableScan { table: bid, columns: [bid.date_time, bid.auction, bid._row_id], pk: [bid._row_id], dist: UpstreamHashShard(bid._row_id) } |
1191 | 1188 | - name: two phase agg with stream SomeShard (via index) but pk satisfies output dist should use shuffle agg
|
1192 | 1189 | sql: |
|
1193 | 1190 | SET QUERY_MODE TO DISTRIBUTED;
|
|
0 commit comments