github.com/whtcorpsinc/MilevaDB-Prod@v0.0.0-20211104133533-f57f4be3b597/dbs/memristed/memex/testdata/expression_suite_in.json (about) 1 [ 2 { 3 "name": "TestOuterJoinPropConst", 4 "cases": [ 5 // Positive tests. 6 "explain select * from t1 left join t2 on t1.a > t2.a and t1.a = 1", 7 "explain select * from t1 left join t2 on t1.a > t2.a where t1.a = 1", 8 "explain select * from t1 left join t2 on t1.a = t2.a and t1.a > 1", 9 "explain select * from t1 left join t2 on t1.a = t2.a where t1.a > 1", 10 "explain select * from t1 right join t2 on t1.a > t2.a where t2.a = 1", 11 "explain select * from t1 right join t2 on t1.a = t2.a where t2.a > 1", 12 "explain select * from t1 right join t2 on t1.a = t2.a and t2.a > 1", 13 "explain select * from t1 right join t2 on t1.a > t2.a and t2.a = 1", 14 // Negative tests. 15 "explain select * from t1 left join t2 on t1.a = t2.a and t2.a > 1", 16 "explain select * from t1 left join t2 on t1.a > t2.a and t2.a = 1", 17 "explain select * from t1 right join t2 on t1.a > t2.a and t1.a = 1", 18 "explain select * from t1 right join t2 on t1.a = t2.a and t1.a > 1", 19 "explain select * from t1 left join t2 on t1.a = t1.b and t1.a > 1", 20 "explain select * from t1 left join t2 on t2.a = t2.b and t2.a > 1", 21 // Constant equal condition merge in outer join. 22 "explain select * from t1 left join t2 on true where t1.a = 1 and false", 23 "explain select * from t1 left join t2 on true where t1.a = 1 and null", 24 "explain select * from t1 left join t2 on true where t1.a = null", 25 "explain select * from t1 left join t2 on true where t1.a = 1 and t1.a = 2", 26 "explain select * from t1 left join t2 on true where t1.a = 1 and t1.a = 1", 27 "explain select * from t1 left join t2 on false", 28 "explain select * from t1 right join t2 on false", 29 "explain select * from t1 left join t2 on t1.a = 1 and t1.a = 2", 30 "explain select * from t1 left join t2 on t1.a =1 where t1.a = 2", 31 "explain select * from t1 left join t2 on t2.a = 1 and t2.a = 2", 32 // Constant propagation for DNF in outer join. 33 "explain select * from t1 left join t2 on t1.a = 1 or (t1.a = 2 and t1.a = 3)", 34 "explain select * from t1 left join t2 on true where t1.a = 1 or (t1.a = 2 and t1.a = 3)", 35 // Constant propagation over left outer semi join, filter with aux defCausumn should not be derived. 36 "explain select * from t1 where t1.b > 1 or t1.b in (select b from t2)", 37 // Don't propagate for the control function. 38 "explain select * from t1 left join t2 on t1.a = t2.a where ifnull(t2.b, t1.a) = 1" 39 ] 40 } 41 ]