wiedld opened a new pull request, #14923:
URL: https://github.com/apache/datafusion/pull/14923

   ## Which issue does this PR close?
   
   Based upon a discussion we were having in another PR, about how the output 
ordering is handled from heterogeneous constants. In summary, it's not about 
the [partitioning of the 
input](https://github.com/apache/datafusion/pull/14821#issuecomment-2686360403),
 instead its about whatever in the sort input considers constant.
   
   Additionally, the `EquivalenceProperties::with_reorder` always treats all 
constants (regardless of heterogeneous or uniform) as to be removed from the 
sort order. This means that if a physical plan node uses this method to 
construct the ordering, (as [does the sort 
exec](https://github.com/apache/datafusion/blob/f5b7affecd90e9be26289d869c4a542359cb98e3/datafusion/physical-plan/src/sorts/sort.rs#L973)),
 it will remove both types of constants. I added a test case to make this 
explicit that this is desired behavior.
   
   ## Rationale for this change
   
   Since there was some discussion on the other PR, perhaps we should add more 
test cases to make the desired behavior explicit?
   
   ## What changes are included in this PR?
   
   Added test cases.
   
   ## Are these changes tested?
   
   yes
   
   ## Are there any user-facing changes?
   no
   


-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to