@@ -2319,7 +2319,7 @@ mod tests {
23192319 "INSERT INTO foo.b1 (a, b, c) VALUES (2, 2, 2)"
23202320 ) . await . unwrap ( ) ;
23212321
2322- let result = service. exec_query ( "EXPLAIN SELECT a, b, sum(c) from ( \
2322+ let result = service. exec_query ( "EXPLAIN SELECT a `sel__a` , b `sel__b` , sum(c) `sel__c` from ( \
23232323 select * from ( \
23242324 select * from foo.a \
23252325 union all \
@@ -2334,19 +2334,25 @@ mod tests {
23342334 union all \
23352335 select * from foo.b \
23362336 ) \
2337- ) group by 1, 2") . await . unwrap ( ) ;
2337+ ) AS `lambda` where a = 1 group by 1, 2 order by 3 desc ") . await . unwrap ( ) ;
23382338 match & result. get_rows ( ) [ 0 ] . values ( ) [ 0 ] {
23392339 TableValue :: String ( s) => {
23402340 assert_eq ! ( s,
2341- "Projection, [a, b, SUM(c)]\
2342- \n Aggregate\
2343- \n ClusterSend, indices: [[1, 2, 3, 4, 2]]\
2344- \n Union\
2345- \n Scan foo.a, source: CubeTable(index: default:1:[1]:sort_on[a, b]), fields: *\
2346- \n Scan foo.b, source: CubeTable(index: default:2:[2]:sort_on[a, b]), fields: *\
2347- \n Scan foo.a1, source: CubeTable(index: default:3:[3]:sort_on[a, b]), fields: *\
2348- \n Scan foo.b1, source: CubeTable(index: default:4:[4]:sort_on[a, b]), fields: *\
2349- \n Scan foo.b, source: CubeTable(index: default:2:[2]:sort_on[a, b]), fields: *"
2341+ "Sort\
2342+ \n Projection, [sel__a, sel__b, sel__c]\
2343+ \n Aggregate\
2344+ \n ClusterSend, indices: [[1, 2, 3, 4, 2]]\
2345+ \n Union\
2346+ \n Filter\
2347+ \n Scan foo.a, source: CubeTable(index: default:1:[1]:sort_on[a, b]), fields: *\
2348+ \n Filter\
2349+ \n Scan foo.b, source: CubeTable(index: default:2:[2]:sort_on[a, b]), fields: *\
2350+ \n Filter\
2351+ \n Scan foo.a1, source: CubeTable(index: default:3:[3]:sort_on[a, b]), fields: *\
2352+ \n Filter\
2353+ \n Scan foo.b1, source: CubeTable(index: default:4:[4]:sort_on[a, b]), fields: *\
2354+ \n Filter\
2355+ \n Scan foo.b, source: CubeTable(index: default:2:[2]:sort_on[a, b]), fields: *"
23502356
23512357 ) ;
23522358 }
0 commit comments