File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -273,7 +273,9 @@ pub(super) fn rewrite_plan_for_sort_on_non_projected_fields(
273273 . expr
274274 . iter ( )
275275 . filter_map ( |e| match e {
276- Expr :: Alias ( alias) if !projected_aliases. contains ( alias. name . as_str ( ) ) => {
276+ Expr :: Alias ( alias)
277+ if !projected_aliases. contains ( alias. name . as_str ( ) ) =>
278+ {
277279 Some ( ( alias. name . clone ( ) , ( * alias. expr ) . clone ( ) ) )
278280 }
279281 _ => None ,
Original file line number Diff line number Diff line change @@ -2997,12 +2997,9 @@ fn test_sort_on_aliased_column_dropped_by_outer_projection() -> Result<()> {
29972997 let plan = table_scan ( Some ( "phys_table" ) , & schema, None ) ?
29982998 . alias ( "t" ) ?
29992999 . project ( vec ! [
3000- Expr :: Column ( Column :: new( Some ( TableReference :: bare( "t" ) ) , "X" ) )
3001- . alias( "a" ) ,
3002- Expr :: Column ( Column :: new( Some ( TableReference :: bare( "t" ) ) , "Y" ) )
3003- . alias( "b" ) ,
3004- Expr :: Column ( Column :: new( Some ( TableReference :: bare( "t" ) ) , "Z" ) )
3005- . alias( "c" ) ,
3000+ Expr :: Column ( Column :: new( Some ( TableReference :: bare( "t" ) ) , "X" ) ) . alias( "a" ) ,
3001+ Expr :: Column ( Column :: new( Some ( TableReference :: bare( "t" ) ) , "Y" ) ) . alias( "b" ) ,
3002+ Expr :: Column ( Column :: new( Some ( TableReference :: bare( "t" ) ) , "Z" ) ) . alias( "c" ) ,
30063003 ] ) ?
30073004 . sort_with_limit (
30083005 vec ! [ Expr :: Column ( Column :: new_unqualified( "c" ) ) . sort( false , true ) ] ,
You can’t perform that action at this time.
0 commit comments