github.com/whtcorpsinc/milevadb-prod@v0.0.0-20211104133533-f57f4be3b597/dbs/memristed/memex/testdata/expression_suite_out.json (about) 1 [ 2 { 3 "Name": "TestOuterJoinPropConst", 4 "Cases": [ 5 { 6 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a > t2.a and t1.a = 1", 7 "Result": [ 8 "HashJoin_6 33233333.33 root CARTESIAN left outer join, left cond:[eq(test.t1.a, 1)]", 9 "├─BlockReader_12(Build) 3323.33 root data:Selection_11", 10 "│ └─Selection_11 3323.33 cop[einsteindb] gt(1, test.t2.a)", 11 "│ └─BlockFullScan_10 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 12 "└─BlockReader_9(Probe) 10000.00 root data:BlockFullScan_8", 13 " └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 14 ] 15 }, 16 { 17 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a > t2.a where t1.a = 1", 18 "Result": [ 19 "HashJoin_8 33233.33 root CARTESIAN left outer join", 20 "├─BlockReader_11(Build) 10.00 root data:Selection_10", 21 "│ └─Selection_10 10.00 cop[einsteindb] eq(test.t1.a, 1)", 22 "│ └─BlockFullScan_9 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo", 23 "└─BlockReader_14(Probe) 3323.33 root data:Selection_13", 24 " └─Selection_13 3323.33 cop[einsteindb] gt(1, test.t2.a)", 25 " └─BlockFullScan_12 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 26 ] 27 }, 28 { 29 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a = t2.a and t1.a > 1", 30 "Result": [ 31 "HashJoin_6 10000.00 root left outer join, equal:[eq(test.t1.a, test.t2.a)], left cond:[gt(test.t1.a, 1)]", 32 "├─BlockReader_12(Build) 3333.33 root data:Selection_11", 33 "│ └─Selection_11 3333.33 cop[einsteindb] gt(test.t2.a, 1), not(isnull(test.t2.a))", 34 "│ └─BlockFullScan_10 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 35 "└─BlockReader_9(Probe) 10000.00 root data:BlockFullScan_8", 36 " └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 37 ] 38 }, 39 { 40 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a = t2.a where t1.a > 1", 41 "Result": [ 42 "HashJoin_7 4166.67 root left outer join, equal:[eq(test.t1.a, test.t2.a)]", 43 "├─BlockReader_14(Build) 3333.33 root data:Selection_13", 44 "│ └─Selection_13 3333.33 cop[einsteindb] gt(test.t2.a, 1), not(isnull(test.t2.a))", 45 "│ └─BlockFullScan_12 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 46 "└─BlockReader_11(Probe) 3333.33 root data:Selection_10", 47 " └─Selection_10 3333.33 cop[einsteindb] gt(test.t1.a, 1)", 48 " └─BlockFullScan_9 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 49 ] 50 }, 51 { 52 "ALLEGROALLEGROSQL": "explain select * from t1 right join t2 on t1.a > t2.a where t2.a = 1", 53 "Result": [ 54 "HashJoin_8 33333.33 root CARTESIAN right outer join", 55 "├─BlockReader_14(Build) 10.00 root data:Selection_13", 56 "│ └─Selection_13 10.00 cop[einsteindb] eq(test.t2.a, 1)", 57 "│ └─BlockFullScan_12 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 58 "└─BlockReader_11(Probe) 3333.33 root data:Selection_10", 59 " └─Selection_10 3333.33 cop[einsteindb] gt(test.t1.a, 1)", 60 " └─BlockFullScan_9 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 61 ] 62 }, 63 { 64 "ALLEGROALLEGROSQL": "explain select * from t1 right join t2 on t1.a = t2.a where t2.a > 1", 65 "Result": [ 66 "HashJoin_7 4166.67 root right outer join, equal:[eq(test.t1.a, test.t2.a)]", 67 "├─BlockReader_11(Build) 3333.33 root data:Selection_10", 68 "│ └─Selection_10 3333.33 cop[einsteindb] gt(test.t1.a, 1), not(isnull(test.t1.a))", 69 "│ └─BlockFullScan_9 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo", 70 "└─BlockReader_14(Probe) 3333.33 root data:Selection_13", 71 " └─Selection_13 3333.33 cop[einsteindb] gt(test.t2.a, 1)", 72 " └─BlockFullScan_12 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 73 ] 74 }, 75 { 76 "ALLEGROALLEGROSQL": "explain select * from t1 right join t2 on t1.a = t2.a and t2.a > 1", 77 "Result": [ 78 "HashJoin_6 10000.00 root right outer join, equal:[eq(test.t1.a, test.t2.a)], right cond:gt(test.t2.a, 1)", 79 "├─BlockReader_10(Build) 3333.33 root data:Selection_9", 80 "│ └─Selection_9 3333.33 cop[einsteindb] gt(test.t1.a, 1), not(isnull(test.t1.a))", 81 "│ └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo", 82 "└─BlockReader_12(Probe) 10000.00 root data:BlockFullScan_11", 83 " └─BlockFullScan_11 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 84 ] 85 }, 86 { 87 "ALLEGROALLEGROSQL": "explain select * from t1 right join t2 on t1.a > t2.a and t2.a = 1", 88 "Result": [ 89 "HashJoin_6 33333333.33 root CARTESIAN right outer join, right cond:eq(test.t2.a, 1)", 90 "├─BlockReader_10(Build) 3333.33 root data:Selection_9", 91 "│ └─Selection_9 3333.33 cop[einsteindb] gt(test.t1.a, 1)", 92 "│ └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo", 93 "└─BlockReader_12(Probe) 10000.00 root data:BlockFullScan_11", 94 " └─BlockFullScan_11 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 95 ] 96 }, 97 { 98 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a = t2.a and t2.a > 1", 99 "Result": [ 100 "HashJoin_6 10000.00 root left outer join, equal:[eq(test.t1.a, test.t2.a)]", 101 "├─BlockReader_12(Build) 3333.33 root data:Selection_11", 102 "│ └─Selection_11 3333.33 cop[einsteindb] gt(test.t2.a, 1), not(isnull(test.t2.a))", 103 "│ └─BlockFullScan_10 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 104 "└─BlockReader_9(Probe) 10000.00 root data:BlockFullScan_8", 105 " └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 106 ] 107 }, 108 { 109 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a > t2.a and t2.a = 1", 110 "Result": [ 111 "HashJoin_6 100000.00 root CARTESIAN left outer join, other cond:gt(test.t1.a, test.t2.a)", 112 "├─BlockReader_12(Build) 10.00 root data:Selection_11", 113 "│ └─Selection_11 10.00 cop[einsteindb] eq(test.t2.a, 1), not(isnull(test.t2.a))", 114 "│ └─BlockFullScan_10 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 115 "└─BlockReader_9(Probe) 10000.00 root data:BlockFullScan_8", 116 " └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 117 ] 118 }, 119 { 120 "ALLEGROALLEGROSQL": "explain select * from t1 right join t2 on t1.a > t2.a and t1.a = 1", 121 "Result": [ 122 "HashJoin_6 100000.00 root CARTESIAN right outer join, other cond:gt(test.t1.a, test.t2.a)", 123 "├─BlockReader_10(Build) 10.00 root data:Selection_9", 124 "│ └─Selection_9 10.00 cop[einsteindb] eq(test.t1.a, 1), not(isnull(test.t1.a))", 125 "│ └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo", 126 "└─BlockReader_12(Probe) 10000.00 root data:BlockFullScan_11", 127 " └─BlockFullScan_11 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 128 ] 129 }, 130 { 131 "ALLEGROALLEGROSQL": "explain select * from t1 right join t2 on t1.a = t2.a and t1.a > 1", 132 "Result": [ 133 "HashJoin_6 10000.00 root right outer join, equal:[eq(test.t1.a, test.t2.a)]", 134 "├─BlockReader_10(Build) 3333.33 root data:Selection_9", 135 "│ └─Selection_9 3333.33 cop[einsteindb] gt(test.t1.a, 1), not(isnull(test.t1.a))", 136 "│ └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo", 137 "└─BlockReader_12(Probe) 10000.00 root data:BlockFullScan_11", 138 " └─BlockFullScan_11 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 139 ] 140 }, 141 { 142 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a = t1.b and t1.a > 1", 143 "Result": [ 144 "HashJoin_6 100000000.00 root CARTESIAN left outer join, left cond:[eq(test.t1.a, test.t1.b) gt(test.t1.a, 1)]", 145 "├─BlockReader_11(Build) 10000.00 root data:BlockFullScan_10", 146 "│ └─BlockFullScan_10 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 147 "└─BlockReader_9(Probe) 10000.00 root data:BlockFullScan_8", 148 " └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 149 ] 150 }, 151 { 152 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t2.a = t2.b and t2.a > 1", 153 "Result": [ 154 "HashJoin_6 26666666.67 root CARTESIAN left outer join", 155 "├─BlockReader_12(Build) 2666.67 root data:Selection_11", 156 "│ └─Selection_11 2666.67 cop[einsteindb] eq(test.t2.a, test.t2.b), gt(test.t2.a, 1)", 157 "│ └─BlockFullScan_10 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 158 "└─BlockReader_9(Probe) 10000.00 root data:BlockFullScan_8", 159 " └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 160 ] 161 }, 162 { 163 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on true where t1.a = 1 and false", 164 "Result": [ 165 "BlockDual_8 0.00 root rows:0" 166 ] 167 }, 168 { 169 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on true where t1.a = 1 and null", 170 "Result": [ 171 "BlockDual_8 0.00 root rows:0" 172 ] 173 }, 174 { 175 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on true where t1.a = null", 176 "Result": [ 177 "BlockDual_8 0.00 root rows:0" 178 ] 179 }, 180 { 181 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on true where t1.a = 1 and t1.a = 2", 182 "Result": [ 183 "BlockDual_8 0.00 root rows:0" 184 ] 185 }, 186 { 187 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on true where t1.a = 1 and t1.a = 1", 188 "Result": [ 189 "HashJoin_8 80000.00 root CARTESIAN left outer join", 190 "├─BlockReader_11(Build) 10.00 root data:Selection_10", 191 "│ └─Selection_10 10.00 cop[einsteindb] eq(test.t1.a, 1)", 192 "│ └─BlockFullScan_9 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo", 193 "└─BlockReader_13(Probe) 10000.00 root data:BlockFullScan_12", 194 " └─BlockFullScan_12 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 195 ] 196 }, 197 { 198 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on false", 199 "Result": [ 200 "HashJoin_6 80000000.00 root CARTESIAN left outer join", 201 "├─BlockDual_10(Build) 8000.00 root rows:0", 202 "└─BlockReader_9(Probe) 10000.00 root data:BlockFullScan_8", 203 " └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 204 ] 205 }, 206 { 207 "ALLEGROALLEGROSQL": "explain select * from t1 right join t2 on false", 208 "Result": [ 209 "HashJoin_6 80000000.00 root CARTESIAN right outer join", 210 "├─BlockDual_8(Build) 8000.00 root rows:0", 211 "└─BlockReader_10(Probe) 10000.00 root data:BlockFullScan_9", 212 " └─BlockFullScan_9 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 213 ] 214 }, 215 { 216 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a = 1 and t1.a = 2", 217 "Result": [ 218 "HashJoin_6 80000000.00 root CARTESIAN left outer join", 219 "├─BlockDual_10(Build) 8000.00 root rows:0", 220 "└─BlockReader_9(Probe) 10000.00 root data:BlockFullScan_8", 221 " └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 222 ] 223 }, 224 { 225 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a =1 where t1.a = 2", 226 "Result": [ 227 "HashJoin_8 80000.00 root CARTESIAN left outer join", 228 "├─BlockReader_11(Build) 10.00 root data:Selection_10", 229 "│ └─Selection_10 10.00 cop[einsteindb] eq(test.t1.a, 2)", 230 "│ └─BlockFullScan_9 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo", 231 "└─BlockDual_12(Probe) 8000.00 root rows:0" 232 ] 233 }, 234 { 235 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t2.a = 1 and t2.a = 2", 236 "Result": [ 237 "HashJoin_6 10000.00 root CARTESIAN left outer join", 238 "├─BlockReader_12(Build) 0.00 root data:Selection_11", 239 "│ └─Selection_11 0.00 cop[einsteindb] eq(test.t2.a, 1), eq(test.t2.a, 2)", 240 "│ └─BlockFullScan_10 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 241 "└─BlockReader_9(Probe) 10000.00 root data:BlockFullScan_8", 242 " └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 243 ] 244 }, 245 { 246 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a = 1 or (t1.a = 2 and t1.a = 3)", 247 "Result": [ 248 "HashJoin_6 100000000.00 root CARTESIAN left outer join, left cond:[or(eq(test.t1.a, 1), 0)]", 249 "├─BlockReader_11(Build) 10000.00 root data:BlockFullScan_10", 250 "│ └─BlockFullScan_10 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 251 "└─BlockReader_9(Probe) 10000.00 root data:BlockFullScan_8", 252 " └─BlockFullScan_8 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 253 ] 254 }, 255 { 256 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on true where t1.a = 1 or (t1.a = 2 and t1.a = 3)", 257 "Result": [ 258 "HashJoin_8 80000.00 root CARTESIAN left outer join", 259 "├─BlockReader_11(Build) 10.00 root data:Selection_10", 260 "│ └─Selection_10 10.00 cop[einsteindb] or(eq(test.t1.a, 1), 0)", 261 "│ └─BlockFullScan_9 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo", 262 "└─BlockReader_13(Probe) 10000.00 root data:BlockFullScan_12", 263 " └─BlockFullScan_12 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo" 264 ] 265 }, 266 { 267 "ALLEGROALLEGROSQL": "explain select * from t1 where t1.b > 1 or t1.b in (select b from t2)", 268 "Result": [ 269 "Projection_7 8000.00 root test.t1.id, test.t1.a, test.t1.b", 270 "└─Selection_8 8000.00 root or(gt(test.t1.b, 1), DeferredCauset#7)", 271 " └─HashJoin_9 10000.00 root CARTESIAN left outer semi join, other cond:eq(test.t1.b, test.t2.b)", 272 " ├─BlockReader_13(Build) 10000.00 root data:BlockFullScan_12", 273 " │ └─BlockFullScan_12 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 274 " └─BlockReader_11(Probe) 10000.00 root data:BlockFullScan_10", 275 " └─BlockFullScan_10 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 276 ] 277 }, 278 { 279 "ALLEGROALLEGROSQL": "explain select * from t1 left join t2 on t1.a = t2.a where ifnull(t2.b, t1.a) = 1", 280 "Result": [ 281 "Selection_7 9990.00 root eq(ifnull(test.t2.b, test.t1.a), 1)", 282 "└─HashJoin_8 12487.50 root left outer join, equal:[eq(test.t1.a, test.t2.a)]", 283 " ├─BlockReader_14(Build) 9990.00 root data:Selection_13", 284 " │ └─Selection_13 9990.00 cop[einsteindb] not(isnull(test.t2.a))", 285 " │ └─BlockFullScan_12 10000.00 cop[einsteindb] causet:t2 keep order:false, stats:pseudo", 286 " └─BlockReader_11(Probe) 10000.00 root data:BlockFullScan_10", 287 " └─BlockFullScan_10 10000.00 cop[einsteindb] causet:t1 keep order:false, stats:pseudo" 288 ] 289 } 290 ] 291 } 292 ]