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

   ## Which issue does this PR close?
   
   Draft as it builds on https://github.com/apache/datafusion/pull/13146
   
   Part of https://github.com/apache/datafusion/issues/12591
   
   
   
   ## Rationale for this change
   
   Before `LexOrdering` and `LexRequirement` were actual structs (thanks to 
@ngli-me  and @berkaysynnada  on 
https://github.com/apache/datafusion/pull/13146!!!), we couldn't put the 
conversion between `LexOrdering` and `LexRequirement` on to the actual 
structures and thus the conversion is done via free functions on 
`PhysicalSortRequirements`
   
   This is confusing for several reasons:
   - The conversion is on another struct (so when Rust programmers go to look 
for a `From` conversion they aren't there)
   - The conversions hide a clone when ideomatic Rust mostly prefers explict 
cloning when it is occuring
   
   This structure bothered me for a long time, so it is time to scratch an itch 
now that @ngli-me  started the ball rolling
   
   
   ## What changes are included in this PR?
   
   1. Deprecate `PhysicalSortRequirement::from_sort_exprs` and 
`PhysicalSortRequirement::to_sort_exprs`
   2. Add `LexOrdering::from_lex_requirement` and 
`LexOrdering::from_lex_ordering` and `From` impls
   3. Update code
   
   ## Are these changes tested?
   
   By existint CI
   ## Are there any user-facing changes?
   
   SOme methods are deprecated with hints about what to use instead
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to