File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed
datafusion/physical-expr/src/equivalence/properties Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -853,20 +853,11 @@ impl EquivalenceProperties {
853853 sort_expr. options ,
854854 ) ) ;
855855 }
856- } else if let Some ( cast_col) =
857- r_expr. as_any ( ) . downcast_ref :: < CastColumnExpr > ( )
856+ } else if let Some ( cast_col) = r_expr. as_any ( ) . downcast_ref :: < CastColumnExpr > ( )
857+ && cast_col. expr ( ) . eq ( & sort_expr. expr )
858+ && CastExpr :: check_bigger_cast ( cast_col. target_field ( ) . data_type ( ) , & expr_type)
858859 {
859- if cast_col. expr ( ) . eq ( & sort_expr. expr )
860- && CastExpr :: check_bigger_cast (
861- cast_col. target_field ( ) . data_type ( ) ,
862- & expr_type,
863- )
864- {
865- result. push ( PhysicalSortExpr :: new (
866- r_expr,
867- sort_expr. options ,
868- ) ) ;
869- }
860+ result. push ( PhysicalSortExpr :: new ( r_expr, sort_expr. options ) ) ;
870861 }
871862 }
872863 result. push ( sort_expr) ;
You can’t perform that action at this time.
0 commit comments