@@ -136,6 +136,24 @@ HashJoin
136
136
137
137
## check outer join is converted to inner join
138
138
139
+ statement ok
140
+ drop table if exists onecolumn
141
+
142
+ statement ok
143
+ CREATE TABLE onecolumn (x INT NULL)
144
+
145
+ statement ok
146
+ INSERT INTO onecolumn(x) VALUES (44), (NULL), (42), (42)
147
+
148
+ statement ok
149
+ drop table if exists twocolumn
150
+
151
+ statement ok
152
+ CREATE TABLE twocolumn (x INT NULL, y INT NULL)
153
+
154
+ statement ok
155
+ INSERT INTO twocolumn(x, y) VALUES (44,51), (NULL,52), (42,53), (45,45)
156
+
139
157
query T
140
158
explain select * from onecolumn as a left join twocolumn as b on a.x = b.x where b.x > 42
141
159
----
@@ -154,9 +172,9 @@ HashJoin
154
172
└── TableScan(Probe)
155
173
├── table: default.default.onecolumn
156
174
├── read rows: 4
157
- ├── read bytes: 62
158
- ├── partitions total: 2
159
- ├── partitions scanned: 2
175
+ ├── read bytes: 37
176
+ ├── partitions total: 1
177
+ ├── partitions scanned: 1
160
178
└── push downs: [filters: [], limit: NONE]
161
179
162
180
query T
@@ -177,9 +195,9 @@ HashJoin
177
195
└── TableScan(Probe)
178
196
├── table: default.default.onecolumn
179
197
├── read rows: 4
180
- ├── read bytes: 62
181
- ├── partitions total: 2
182
- ├── partitions scanned: 2
198
+ ├── read bytes: 37
199
+ ├── partitions total: 1
200
+ ├── partitions scanned: 1
183
201
└── push downs: [filters: [], limit: NONE]
184
202
185
203
@@ -201,9 +219,9 @@ HashJoin
201
219
└── TableScan(Probe)
202
220
├── table: default.default.onecolumn
203
221
├── read rows: 4
204
- ├── read bytes: 62
205
- ├── partitions total: 2
206
- ├── partitions scanned: 2
222
+ ├── read bytes: 37
223
+ ├── partitions total: 1
224
+ ├── partitions scanned: 1
207
225
└── push downs: [filters: [], limit: NONE]
208
226
209
227
## the following cases won't be converted to inner join
@@ -228,9 +246,9 @@ Filter
228
246
└── TableScan(Probe)
229
247
├── table: default.default.onecolumn
230
248
├── read rows: 4
231
- ├── read bytes: 62
232
- ├── partitions total: 2
233
- ├── partitions scanned: 2
249
+ ├── read bytes: 37
250
+ ├── partitions total: 1
251
+ ├── partitions scanned: 1
234
252
└── push downs: [filters: [], limit: NONE]
235
253
236
254
query T
@@ -251,8 +269,7 @@ HashJoin
251
269
└── TableScan(Probe)
252
270
├── table: default.default.onecolumn
253
271
├── read rows: 4
254
- ├── read bytes: 62
255
- ├── partitions total: 2
256
- ├── partitions scanned: 2
272
+ ├── read bytes: 37
273
+ ├── partitions total: 1
274
+ ├── partitions scanned: 1
257
275
└── push downs: [filters: [], limit: NONE]
258
-
0 commit comments