@@ -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
279279query T
280280explain select * from onecolumn as a left join twocolumn as b on a.x = b.x where b.x > 44 or b.x < 43
281281----
282282HashJoin
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
316316query T
317317explain select * from onecolumn as a left join twocolumn as b on a.x = b.x where b.x > 42 and b.x < 45
318318----
319319HashJoin
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
358358Filter
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
427427statement ok
428428drop table t
0 commit comments