findepi opened a new issue, #12193:
URL: https://github.com/apache/datafusion/issues/12193

   
   
   > > There are other Expr variants that only make sense in certain contexts 
as well. We can't have an Expr::Sort in a projection, for example.
   > 
   > That's a good point and good example. To me, in `ORDER BY <expr> 
[ASC/DESC] [NULLS FIRST/LAST]`, the `<expr>` part is an expression (any 
expression), and the other attributes (asc/desc, nulls first/last) are 
attributes of the sorting. They don't have to be modeled as "an expression".
   
   I think Sort would be an easier thing to remove / fix -- `Expr::Sort` as an 
expression is also bad as it means the signatures of `fn order_by(...)` are in 
terms of `Expr`, meaning the compiler can't ensure you are actually passing 
`Expr::Sort` when needed
   
   _Originally posted by @alamb in 
https://github.com/apache/datafusion/issues/1468#issuecomment-2308275476_
               


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