@@ -2054,7 +2054,7 @@ pub mod tests {
20542054 // Projections should be handled properly.
20552055 let plan = initial_plan (
20562056 "SELECT order_customer `customer`, SUM(order_amount) `amount` FROM s.Orders \
2057- GROUP BY 1 ORDER BY 2 DESC LIMIT 10",
2057+ GROUP BY 1 ORDER BY 2 DESC NULLS LAST LIMIT 10",
20582058 & indices,
20592059 ) ;
20602060 let plan = choose_index ( plan, & indices) . await . unwrap ( ) . 0 ;
@@ -2067,7 +2067,7 @@ pub mod tests {
20672067
20682068 let plan = initial_plan (
20692069 "SELECT SUM(order_amount) `amount`, order_customer `customer` FROM s.Orders \
2070- GROUP BY 2 ORDER BY 1 DESC LIMIT 10",
2070+ GROUP BY 2 ORDER BY 1 DESC NULLS LAST LIMIT 10",
20712071 & indices,
20722072 ) ;
20732073 let plan = choose_index ( plan, & indices) . await . unwrap ( ) . 0 ;
@@ -2091,14 +2091,14 @@ pub mod tests {
20912091 pretty_printers:: pp_plan_ext( & plan, & with_sort_by) ,
20922092 "Projection, [customer, amount]\
20932093 \n ClusterAggregateTopK, limit: 10, sortBy: [2 null last]\
2094- \n Scan s.Orders , source: CubeTable(index: by_customer:3:[]:sort_on[order_customer]), fields: [order_customer, order_amount]"
2094+ \n Scan s.orders , source: CubeTable(index: by_customer:3:[]:sort_on[order_customer]), fields: [order_customer, order_amount]"
20952095 ) ;
20962096
20972097 // MAX and MIN are ok, as well as multiple aggregation.
20982098 let plan = initial_plan (
20992099 "SELECT order_customer `customer`, SUM(order_amount) `amount`, \
21002100 MIN(order_amount) `min_amount`, MAX(order_amount) `max_amount` \
2101- FROM s.Orders \
2101+ FROM s.orders \
21022102 GROUP BY 1 ORDER BY 3 DESC, 2 ASC LIMIT 10",
21032103 & indices,
21042104 ) ;
@@ -2108,8 +2108,8 @@ pub mod tests {
21082108 assert_eq ! (
21092109 pretty_printers:: pp_plan_ext( & plan, & verbose) ,
21102110 "Projection, [customer, amount, min_amount, max_amount]\
2111- \n ClusterAggregateTopK, limit: 10, aggs: [SUM(#s.Orders .order_amount), MIN(#s.Orders .order_amount), MAX(#s.Orders .order_amount)], sortBy: [3 desc null last, 2 null last]\
2112- \n Scan s.Orders , source: CubeTable(index: by_customer:3:[]:sort_on[order_customer]), fields: [order_customer, order_amount]"
2111+ \n ClusterAggregateTopK, limit: 10, aggs: [SUM(#s.orders .order_amount), MIN(#s.orders .order_amount), MAX(#s.orders .order_amount)], sortBy: [3 desc null last, 2 null last]\
2112+ \n Scan s.orders , source: CubeTable(index: by_customer:3:[]:sort_on[order_customer]), fields: [order_customer, order_amount]"
21132113 ) ;
21142114
21152115 // Should not introduce TopK by mistake in unsupported cases.
0 commit comments