datafusion
datafusion copied to clipboard
Remove Sort expression (`Expr::Sort`)
Remove sort as an expression, i.e. remove Expr::Sort from Expr enum.
Use expr::Sort directly when sorting.
The sort expression was used in context of ordering (sort, topk, create table, file sorting). Those places require their sort expression to be of type Sort anyway and no other expression was allowed, so this change improves static typing. Sort as an expression was illegal in other contexts.
For https://github.com/apache/datafusion/issues/1468#issuecomment-2308275476 Fixes https://github.com/apache/datafusion/issues/12193
Not ready for review. Just for FYI.
The build is all green (https://github.com/findepi/datafusion/actions/runs/10574858019)!
Rebased, should be ready for initial review pass.
I split the change into couple commits, but bulk of it is still one big commit. Should i continue along this pattern? Should i extract some commits into own PRs let me know what's best from review perspective.
cc @alamb @comphead @jonahgao @jayzhan211 @andygrove @crepererum
there is a new conflict (perhaps due to https://github.com/apache/datafusion/pull/12196), let me rebase.
thank you @jayzhan211 for your review! would you mind taking another look?
EPIC!
thank you @jayzhan211 @crepererum @alamb for all your time spent reviewing this!
❤️ thank you for the (brave) merge, @crepererum !