Skip to content

Commit 8456cae

Browse files
committed
more tests
1 parent fe8f611 commit 8456cae

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

enginetest/join_op_tests.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,15 @@ var DefaultJoinOpTests = []joinOpTest{
249249
Query: "select /*+ JOIN_ORDER(xy,ab) */ x from xy left join ab on x = a and z = 5 where a is null order by x ",
250250
Expected: []sql.Row{{1}, {2}, {3}, {4}},
251251
},
252+
// partial return
253+
{
254+
Query: "select /*+ JOIN_ORDER(ab,xy) */ x from xy left join ab on x = a and z = 1 where a is null order by x ",
255+
Expected: []sql.Row{{1}, {3}, {4}},
256+
},
257+
{
258+
Query: "select /*+ JOIN_ORDER(xy,ab) */ x from xy left join ab on x = a and z in (1,2) where a is null order by x ",
259+
Expected: []sql.Row{{1}, {4}},
260+
},
252261
},
253262
},
254263
{
@@ -264,6 +273,7 @@ var DefaultJoinOpTests = []joinOpTest{
264273
},
265274
tests: []JoinOpTests{
266275
{
276+
// the literal z should be internally cast to the appropriate string type
267277
Query: "select /*+ JOIN_ORDER(ab,xy) */ count(*) from xy join ab on y = a and z = 0",
268278
Expected: []sql.Row{{1}},
269279
},

0 commit comments

Comments
 (0)