Skip to content

Commit 0d21a60

Browse files
committed
x
1 parent e084f37 commit 0d21a60

15 files changed

Lines changed: 65 additions & 65 deletions

tests/sqllogictests/suites/mode/cluster/explain_v2.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Exchange
4343
└── Filter
4444
├── output columns: [t1.a (#0), t1.b (#1), t2.b (#3), t2.a (#2)]
4545
├── filters: [t1.a (#0) > 3 or t2.a (#2) > 5 and t1.a (#0) > 1]
46-
├── estimated rows: 99.68
46+
├── estimated rows: 99.60
4747
└── HashJoin
4848
├── output columns: [t1.a (#0), t1.b (#1), t2.b (#3), t2.a (#2)]
4949
├── join type: INNER
@@ -53,7 +53,7 @@ Exchange
5353
├── filters: []
5454
├── build join filters:
5555
│ └── filter id:0, build key:t2.a (#2), probe targets:[t1.a (#0)@scan0], filter type:bloom,inlist,min_max
56-
├── estimated rows: 99.92
56+
├── estimated rows: 99.84
5757
├── Exchange(Build)
5858
│ ├── output columns: [t2.a (#2), t2.b (#3)]
5959
│ ├── exchange type: Broadcast

tests/sqllogictests/suites/mode/cluster/filter_nulls.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Exchange
9090
├── filters: []
9191
├── build join filters:
9292
│ └── filter id:1, build key:table3.value (#2), probe targets:[table1.value (#0)@scan0], filter type:bloom,inlist,min_max
93-
├── estimated rows: 200.00
93+
├── estimated rows: 500.00
9494
├── Exchange(Build)
9595
│ ├── output columns: [table3.value (#2), table2.value (#1)]
9696
│ ├── exchange type: Broadcast

tests/sqllogictests/suites/mode/cluster/window.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Exchange
8787
└── WindowPartition
8888
├── output columns: [e.name (#1), e.salary (#3), d.department_name (#5), d.department_id (#4)]
8989
├── hash keys: [department_id]
90-
├── estimated rows: 8.00
90+
├── estimated rows: 10.00
9191
└── Exchange
9292
├── output columns: [e.name (#1), e.salary (#3), d.department_name (#5), d.department_id (#4)]
9393
├── exchange type: Hash(d.department_id (#4))
@@ -100,7 +100,7 @@ Exchange
100100
├── filters: []
101101
├── build join filters:
102102
│ └── filter id:0, build key:d.department_id (#4), probe targets:[e.department_id (#2)@scan0], filter type:bloom,inlist,min_max
103-
├── estimated rows: 8.00
103+
├── estimated rows: 10.00
104104
├── Exchange(Build)
105105
│ ├── output columns: [d.department_id (#4), d.department_name (#5)]
106106
│ ├── exchange type: Broadcast

tests/sqllogictests/suites/mode/standalone/explain/bloom_filter.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ explain select 1 from bloom_test_t where c1 = '5'
3939
EvalScalar
4040
├── output columns: [1 (#2)]
4141
├── expressions: [1]
42-
├── estimated rows: 1.50
42+
├── estimated rows: 1.20
4343
└── TableScan
4444
├── table: default.default.bloom_test_t
4545
├── scan id: 0
@@ -50,7 +50,7 @@ EvalScalar
5050
├── partitions scanned: 1
5151
├── pruning stats: [segments: <range pruning: 2 to 2 cost: <slt:ignore>>, blocks: <range pruning: 2 to 2 cost: <slt:ignore>, bloom pruning: 2 to 1 cost: <slt:ignore>>]
5252
├── push downs: [filters: [is_true(bloom_test_t.c1 (#0) = '5')], limit: NONE]
53-
└── estimated rows: 1.50
53+
└── estimated rows: 1.20
5454

5555
query I
5656
select 1 from bloom_test_t where c1 = 5

tests/sqllogictests/suites/mode/standalone/explain/delete.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ CommitSink
102102
├── filters: []
103103
├── build join filters:
104104
│ └── filter id:0, build key:subquery_2 (#2), probe targets:[t1.a (#0)@scan0], filter type:bloom,inlist,min_max
105-
├── estimated rows: 2.00
105+
├── estimated rows: 1.75
106106
├── TableScan(Build)
107107
│ ├── table: default.default.t2
108108
│ ├── scan id: 1
@@ -125,4 +125,4 @@ CommitSink
125125
├── pruning stats: [segments: <range pruning: 1 to 1 cost: <slt:ignore>>, blocks: <range pruning: 1 to 1 cost: <slt:ignore>>]
126126
├── push downs: [filters: [is_true(t1.b (#1) > 2)], limit: NONE]
127127
├── apply join filters: [#0]
128-
└── estimated rows: 3.00
128+
└── estimated rows: 3.50

tests/sqllogictests/suites/mode/standalone/explain/eliminate_outer_join.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ HashJoin
340340
├── filters: []
341341
├── build join filters:
342342
│ └── filter id:0, build key:t1.a (#1), probe targets:[t.a (#0)@scan0], filter type:bloom,inlist,min_max
343-
├── estimated rows: 8.00
343+
├── estimated rows: 7.31
344344
├── TableScan(Build)
345345
│ ├── table: default.eliminate_outer_join.t
346346
│ ├── scan id: 1
@@ -414,7 +414,7 @@ HashJoin
414414
├── filters: []
415415
├── build join filters:
416416
│ └── filter id:0, build key:t1.a (#1), probe targets:[t.a (#0)@scan0], filter type:bloom,inlist,min_max
417-
├── estimated rows: 9.00
417+
├── estimated rows: 8.28
418418
├── TableScan(Build)
419419
│ ├── table: default.eliminate_outer_join.t
420420
│ ├── scan id: 1
@@ -558,7 +558,7 @@ explain select * from t left join t t1 on t.a = t1.a where t1.a <= 1 or (t.a > 1
558558
Filter
559559
├── output columns: [t.a (#0), t1.a (#1)]
560560
├── filters: [t1.a (#1) <= 1 or t.a (#0) > 1 and t1.a (#1) > 1]
561-
├── estimated rows: 7.65
561+
├── estimated rows: 5.93
562562
└── HashJoin
563563
├── output columns: [t.a (#0), t1.a (#1)]
564564
├── join type: INNER
@@ -568,7 +568,7 @@ Filter
568568
├── filters: []
569569
├── build join filters:
570570
│ └── filter id:0, build key:t1.a (#1), probe targets:[t.a (#0)@scan0], filter type:bloom,inlist,min_max
571-
├── estimated rows: 8.40
571+
├── estimated rows: 7.06
572572
├── TableScan(Build)
573573
│ ├── table: default.eliminate_outer_join.t
574574
│ ├── scan id: 1

tests/sqllogictests/suites/mode/standalone/explain/explain.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,11 +547,11 @@ Limit
547547
└── Sort(Single)
548548
├── output columns: [t2.a (#2), t2.b (#3), t1.a (#0), t1.b (#1)]
549549
├── sort keys: [a DESC NULLS LAST]
550-
├── estimated rows: 3.85
550+
├── estimated rows: 3.87
551551
└── Filter
552552
├── output columns: [t2.a (#2), t2.b (#3), t1.a (#0), t1.b (#1)]
553553
├── filters: [(t1.a (#0) > 1 or t1.b (#1) < 2) and t2.a (#2) > 2 or t1.b (#1) < 3 and t2.b (#3) < 4]
554-
├── estimated rows: 3.85
554+
├── estimated rows: 3.87
555555
└── HashJoin
556556
├── output columns: [t2.a (#2), t2.b (#3), t1.a (#0), t1.b (#1)]
557557
├── join type: CROSS
@@ -981,7 +981,7 @@ HashJoin
981981
├── probe keys: [CAST(CAST(subquery_2 (#2) AS UInt16 NULL) AS Int32 NULL)]
982982
├── keys is null equal: [false]
983983
├── filters: []
984-
├── estimated rows: 2.20
984+
├── estimated rows: 2.18
985985
├── TableScan(Build)
986986
│ ├── table: default.default.t1
987987
│ ├── scan id: 0

tests/sqllogictests/suites/mode/standalone/explain/explain_analyze_partial.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ query T
6464
explain analyze partial select * from t1 join t2 on t1.a = t2.b where t1.a > 1;
6565
----
6666
HashJoin: INNER
67-
├── estimated rows: 8.00
67+
├── estimated rows: 7.31
6868
├── output rows: 8
6969
├── TableScan
7070
│ ├── table: default.default.t2

tests/sqllogictests/suites/mode/standalone/explain/explain_like.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ explain select * from t1 where s like 'abcd%' order by s;
5050
Sort(Single)
5151
├── output columns: [t1.s (#0)]
5252
├── sort keys: [s ASC NULLS LAST]
53-
├── estimated rows: 1.00
53+
├── estimated rows: 2.50
5454
└── TableScan
5555
├── table: default.default.t1
5656
├── scan id: 0
@@ -61,7 +61,7 @@ Sort(Single)
6161
├── partitions scanned: 1
6262
├── pruning stats: [segments: <range pruning: 1 to 1 cost: <slt:ignore>>, blocks: <range pruning: 1 to 1 cost: <slt:ignore>>]
6363
├── push downs: [filters: [t1.s (#0) >= 'abcd' and t1.s (#0) < 'abce'], limit: NONE]
64-
└── estimated rows: 1.00
64+
└── estimated rows: 2.50
6565

6666
query T
6767
select * from t1 where s like 'abcd' order by s;

tests/sqllogictests/suites/mode/standalone/explain/join.test

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ HashJoin
251251
├── filters: []
252252
├── build join filters:
253253
│ └── filter id:0, build key:a.x (#0), probe targets:[b.x (#1)@scan1], filter type:bloom,inlist,min_max
254-
├── estimated rows: 2.67
254+
├── estimated rows: 2.00
255255
├── TableScan(Build)
256256
│ ├── table: default.default.onecolumn
257257
│ ├── scan id: 0
@@ -274,81 +274,81 @@ HashJoin
274274
├── pruning stats: [segments: <range pruning: 1 to 1 cost: <slt:ignore>>, blocks: <range pruning: 1 to 1 cost: <slt:ignore>>]
275275
├── push downs: [filters: [is_true(twocolumn.x (#1) > 42)], limit: NONE]
276276
├── apply join filters: [#0]
277-
└── estimated rows: 2.67
277+
└── estimated rows: 3.00
278278

279279
query T
280280
explain select * from onecolumn as a left join twocolumn as b on a.x = b.x where b.x > 44 or b.x < 43
281281
----
282282
HashJoin
283-
├── output columns: [a.x (#0), b.y (#2), b.x (#1)]
283+
├── output columns: [b.x (#1), b.y (#2), a.x (#0)]
284284
├── join type: INNER
285-
├── build keys: [b.x (#1)]
286-
├── probe keys: [a.x (#0)]
285+
├── build keys: [a.x (#0)]
286+
├── probe keys: [b.x (#1)]
287287
├── keys is null equal: [false]
288288
├── filters: []
289289
├── build join filters:
290-
│ └── filter id:0, build key:b.x (#1), probe targets:[a.x (#0)@scan0], filter type:bloom,inlist,min_max
291-
├── estimated rows: 2.67
290+
│ └── filter id:0, build key:a.x (#0), probe targets:[b.x (#1)@scan1], filter type:bloom,inlist,min_max
291+
├── estimated rows: 1.17
292292
├── TableScan(Build)
293-
│ ├── table: default.default.twocolumn
294-
│ ├── scan id: 1
295-
│ ├── output columns: [x (#1), y (#2)]
293+
│ ├── table: default.default.onecolumn
294+
│ ├── scan id: 0
295+
│ ├── output columns: [x (#0)]
296296
│ ├── read rows: 4
297297
│ ├── read size: < 1 KiB
298298
│ ├── partitions total: 1
299299
│ ├── partitions scanned: 1
300300
│ ├── pruning stats: [segments: <range pruning: 1 to 1 cost: <slt:ignore>>, blocks: <range pruning: 1 to 1 cost: <slt:ignore>>]
301-
│ ├── push downs: [filters: [twocolumn.x (#1) > 44 or twocolumn.x (#1) < 43], limit: NONE]
302-
│ └── estimated rows: 2.00
301+
│ ├── push downs: [filters: [onecolumn.x (#0) > 44 or onecolumn.x (#0) < 43], limit: NONE]
302+
│ └── estimated rows: 1.33
303303
└── TableScan(Probe)
304-
├── table: default.default.onecolumn
305-
├── scan id: 0
306-
├── output columns: [x (#0)]
304+
├── table: default.default.twocolumn
305+
├── scan id: 1
306+
├── output columns: [x (#1), y (#2)]
307307
├── read rows: 4
308308
├── read size: < 1 KiB
309309
├── partitions total: 1
310310
├── partitions scanned: 1
311311
├── pruning stats: [segments: <range pruning: 1 to 1 cost: <slt:ignore>>, blocks: <range pruning: 1 to 1 cost: <slt:ignore>>]
312-
├── push downs: [filters: [onecolumn.x (#0) > 44 or onecolumn.x (#0) < 43], limit: NONE]
312+
├── push downs: [filters: [twocolumn.x (#1) > 44 or twocolumn.x (#1) < 43], limit: NONE]
313313
├── apply join filters: [#0]
314-
└── estimated rows: 2.67
314+
└── estimated rows: 1.75
315315

316316
query T
317317
explain select * from onecolumn as a left join twocolumn as b on a.x = b.x where b.x > 42 and b.x < 45
318318
----
319319
HashJoin
320-
├── output columns: [a.x (#0), b.y (#2), b.x (#1)]
320+
├── output columns: [b.x (#1), b.y (#2), a.x (#0)]
321321
├── join type: INNER
322-
├── build keys: [b.x (#1)]
323-
├── probe keys: [a.x (#0)]
322+
├── build keys: [a.x (#0)]
323+
├── probe keys: [b.x (#1)]
324324
├── keys is null equal: [false]
325325
├── filters: []
326326
├── build join filters:
327-
│ └── filter id:0, build key:b.x (#1), probe targets:[a.x (#0)@scan0], filter type:bloom,inlist,min_max
328-
├── estimated rows: 4.00
327+
│ └── filter id:0, build key:a.x (#0), probe targets:[b.x (#1)@scan1], filter type:bloom,inlist,min_max
328+
├── estimated rows: 2.00
329329
├── TableScan(Build)
330-
│ ├── table: default.default.twocolumn
331-
│ ├── scan id: 1
332-
│ ├── output columns: [x (#1), y (#2)]
330+
│ ├── table: default.default.onecolumn
331+
│ ├── scan id: 0
332+
│ ├── output columns: [x (#0)]
333333
│ ├── read rows: 4
334334
│ ├── read size: < 1 KiB
335335
│ ├── partitions total: 1
336336
│ ├── partitions scanned: 1
337337
│ ├── pruning stats: [segments: <range pruning: 1 to 1 cost: <slt:ignore>>, blocks: <range pruning: 1 to 1 cost: <slt:ignore>>]
338-
│ ├── push downs: [filters: [twocolumn.x (#1) > 42 and twocolumn.x (#1) < 45], limit: NONE]
338+
│ ├── push downs: [filters: [onecolumn.x (#0) > 42 and onecolumn.x (#0) < 45], limit: NONE]
339339
│ └── estimated rows: 2.00
340340
└── TableScan(Probe)
341-
├── table: default.default.onecolumn
342-
├── scan id: 0
343-
├── output columns: [x (#0)]
341+
├── table: default.default.twocolumn
342+
├── scan id: 1
343+
├── output columns: [x (#1), y (#2)]
344344
├── read rows: 4
345345
├── read size: < 1 KiB
346346
├── partitions total: 1
347347
├── partitions scanned: 1
348348
├── pruning stats: [segments: <range pruning: 1 to 1 cost: <slt:ignore>>, blocks: <range pruning: 1 to 1 cost: <slt:ignore>>]
349-
├── push downs: [filters: [onecolumn.x (#0) > 42 and onecolumn.x (#0) < 45], limit: NONE]
349+
├── push downs: [filters: [twocolumn.x (#1) > 42 and twocolumn.x (#1) < 45], limit: NONE]
350350
├── apply join filters: [#0]
351-
└── estimated rows: 2.00
351+
└── estimated rows: 3.00
352352

353353
# the following cases won't be converted to inner join
354354

@@ -358,7 +358,7 @@ explain select * from onecolumn as a left join twocolumn as b on a.x = b.x where
358358
Filter
359359
├── output columns: [a.x (#0), b.x (#1), b.y (#2)]
360360
├── filters: [b.x (#1) > 44 or a.x (#0) < 43]
361-
├── estimated rows: 3.56
361+
├── estimated rows: 1.78
362362
└── HashJoin
363363
├── output columns: [a.x (#0), b.x (#1), b.y (#2)]
364364
├── join type: LEFT OUTER
@@ -400,7 +400,7 @@ HashJoin
400400
├── probe keys: [b.x (#1)]
401401
├── keys is null equal: [false]
402402
├── filters: []
403-
├── estimated rows: 4.00
403+
├── estimated rows: 3.00
404404
├── TableScan(Build)
405405
│ ├── table: default.default.onecolumn
406406
│ ├── scan id: 0
@@ -422,7 +422,7 @@ HashJoin
422422
├── partitions scanned: 1
423423
├── pruning stats: [segments: <range pruning: 1 to 1 cost: <slt:ignore>>, blocks: <range pruning: 1 to 1 cost: <slt:ignore>>]
424424
├── push downs: [filters: [twocolumn.x (#1) > 42 and twocolumn.x (#1) < 45], limit: NONE]
425-
└── estimated rows: 2.00
425+
└── estimated rows: 3.00
426426

427427
statement ok
428428
drop table t

0 commit comments

Comments
 (0)