@@ -80,87 +80,91 @@ Limit
8080├── output columns: [t.number (#0)]
8181├── limit: 3
8282├── offset: 0
83- ├── estimated rows: 1.00
83+ ├── estimated rows: 0.20
8484└── Sort
8585 ├── output columns: [t.number (#0)]
8686 ├── sort keys: [number DESC NULLS LAST]
87- ├── estimated rows: 1.00
87+ ├── estimated rows: 0.20
8888 └── AggregateFinal
8989 ├── output columns: [t.number (#0)]
9090 ├── group by: [number]
9191 ├── aggregate functions: []
92- ├── estimated rows: 1.00
92+ ├── estimated rows: 0.20
9393 └── AggregatePartial
9494 ├── group by: [number]
9595 ├── aggregate functions: []
96- ├── estimated rows: 1.00
96+ ├── estimated rows: 0.20
9797 ├── rank limit: 3
98- └── HashJoin
98+ └── Filter
9999 ├── output columns: [t.number (#0)]
100- ├── join type: INNER
101- ├── build keys: [number (#2), if(true, TRY_CAST(scalar_subquery_4 (#4) AS UInt64 NULL), 0)]
102- ├── probe keys: [number (#0), CAST(t.number (#0) AS UInt64 NULL)]
103- ├── filters: []
104- ├── estimated rows: 1.00
105- ├── AggregateFinal(Build)
106- │ ├── output columns: [COUNT(*) (#4), t2.number (#2)]
107- │ ├── group by: [number]
108- │ ├── aggregate functions: [count()]
109- │ ├── estimated rows: 1.00
110- │ └── AggregatePartial
111- │ ├── group by: [number]
112- │ ├── aggregate functions: [count()]
113- │ ├── estimated rows: 1.00
114- │ └── HashJoin
115- │ ├── output columns: [t2.number (#2)]
116- │ ├── join type: CROSS
117- │ ├── build keys: []
118- │ ├── probe keys: []
119- │ ├── filters: []
120- │ ├── estimated rows: 1.00
121- │ ├── TableScan(Build)
122- │ │ ├── table: default.system.numbers
123- │ │ ├── output columns: []
124- │ │ ├── read rows: 1
125- │ │ ├── read size: < 1 KiB
126- │ │ ├── partitions total: 1
127- │ │ ├── partitions scanned: 1
128- │ │ ├── push downs: [filters: [], limit: NONE]
129- │ │ └── estimated rows: 1.00
130- │ └── TableScan(Probe)
131- │ ├── table: default.system.numbers
132- │ ├── output columns: [number (#2)]
133- │ ├── read rows: 1
134- │ ├── read size: < 1 KiB
135- │ ├── partitions total: 1
136- │ ├── partitions scanned: 1
137- │ ├── push downs: [filters: [], limit: NONE]
138- │ └── estimated rows: 1.00
139- └── HashJoin(Probe)
140- ├── output columns: [t.number (#0)]
141- ├── join type: CROSS
142- ├── build keys: []
143- ├── probe keys: []
100+ ├── filters: [is_true(CAST(t.number (#0) AS UInt64 NULL) = if(CAST(is_not_null(scalar_subquery_4 (#4)) AS Boolean NULL), scalar_subquery_4 (#4), 0))]
101+ ├── estimated rows: 0.20
102+ └── HashJoin
103+ ├── output columns: [t.number (#0), COUNT(*) (#4)]
104+ ├── join type: LEFT OUTER
105+ ├── build keys: [number (#2)]
106+ ├── probe keys: [CAST(number (#0) AS UInt64 NULL)]
144107 ├── filters: []
145108 ├── estimated rows: 1.00
146- ├── TableScan(Build)
147- │ ├── table: default.system.numbers
148- │ ├── output columns: []
149- │ ├── read rows: 1
150- │ ├── read size: < 1 KiB
151- │ ├── partitions total: 1
152- │ ├── partitions scanned: 1
153- │ ├── push downs: [filters: [], limit: NONE]
154- │ └── estimated rows: 1.00
155- └── TableScan(Probe)
156- ├── table: default.system.numbers
157- ├── output columns: [number (#0)]
158- ├── read rows: 1
159- ├── read size: < 1 KiB
160- ├── partitions total: 1
161- ├── partitions scanned: 1
162- ├── push downs: [filters: [], limit: NONE]
163- └── estimated rows: 1.00
109+ ├── AggregateFinal(Build)
110+ │ ├── output columns: [COUNT(*) (#4), t2.number (#2)]
111+ │ ├── group by: [number]
112+ │ ├── aggregate functions: [count()]
113+ │ ├── estimated rows: 1.00
114+ │ └── AggregatePartial
115+ │ ├── group by: [number]
116+ │ ├── aggregate functions: [count()]
117+ │ ├── estimated rows: 1.00
118+ │ └── HashJoin
119+ │ ├── output columns: [t2.number (#2)]
120+ │ ├── join type: CROSS
121+ │ ├── build keys: []
122+ │ ├── probe keys: []
123+ │ ├── filters: []
124+ │ ├── estimated rows: 1.00
125+ │ ├── TableScan(Build)
126+ │ │ ├── table: default.system.numbers
127+ │ │ ├── output columns: []
128+ │ │ ├── read rows: 1
129+ │ │ ├── read size: < 1 KiB
130+ │ │ ├── partitions total: 1
131+ │ │ ├── partitions scanned: 1
132+ │ │ ├── push downs: [filters: [], limit: NONE]
133+ │ │ └── estimated rows: 1.00
134+ │ └── TableScan(Probe)
135+ │ ├── table: default.system.numbers
136+ │ ├── output columns: [number (#2)]
137+ │ ├── read rows: 1
138+ │ ├── read size: < 1 KiB
139+ │ ├── partitions total: 1
140+ │ ├── partitions scanned: 1
141+ │ ├── push downs: [filters: [], limit: NONE]
142+ │ └── estimated rows: 1.00
143+ └── HashJoin(Probe)
144+ ├── output columns: [t.number (#0)]
145+ ├── join type: CROSS
146+ ├── build keys: []
147+ ├── probe keys: []
148+ ├── filters: []
149+ ├── estimated rows: 1.00
150+ ├── TableScan(Build)
151+ │ ├── table: default.system.numbers
152+ │ ├── output columns: []
153+ │ ├── read rows: 1
154+ │ ├── read size: < 1 KiB
155+ │ ├── partitions total: 1
156+ │ ├── partitions scanned: 1
157+ │ ├── push downs: [filters: [], limit: NONE]
158+ │ └── estimated rows: 1.00
159+ └── TableScan(Probe)
160+ ├── table: default.system.numbers
161+ ├── output columns: [number (#0)]
162+ ├── read rows: 1
163+ ├── read size: < 1 KiB
164+ ├── partitions total: 1
165+ ├── partitions scanned: 1
166+ ├── push downs: [filters: [], limit: NONE]
167+ └── estimated rows: 1.00
164168
165169query T
166170explain select * from (select count(t1.number) as c1 from numbers(1) as t1 group by number) as t3 left join (select count(t.number) as c from numbers(2) as t group by number) as t4 on t3.c1=t4.c order by t3.c1 limit 1
0 commit comments