alamb commented on code in PR #8485:
URL: https://github.com/apache/arrow-datafusion/pull/8485#discussion_r1422603210


##########
datafusion/core/src/physical_optimizer/projection_pushdown.rs:
##########
@@ -454,7 +454,8 @@ fn try_swapping_with_sort(
 
     Ok(Some(Arc::new(
         SortExec::new(updated_exprs, make_with_child(projection, 
sort.input())?)

Review Comment:
   Ah, but I see this API doesn't permit rewriting new exprs 🤔 



##########
datafusion/core/src/physical_optimizer/projection_pushdown.rs:
##########
@@ -454,7 +454,8 @@ fn try_swapping_with_sort(
 
     Ok(Some(Arc::new(
         SortExec::new(updated_exprs, make_with_child(projection, 
sort.input())?)

Review Comment:
   I suggest calling `new_with_children` here 
https://docs.rs/datafusion/latest/datafusion/physical_plan/trait.ExecutionPlan.html#tymethod.with_new_children
 as that both:
   1. [Does the right 
thing](https://docs.rs/datafusion-physical-plan/33.0.0/src/datafusion_physical_plan/sorts/sort.rs.html#844-850)
   2. Is more likely to be kept up to date other fields are added to SortExec 
in the future
   
   Update: Ah, but I see this API doesn't permit rewriting new exprs 🤔 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to