findepi commented on issue #1468:
URL: https://github.com/apache/datafusion/issues/1468#issuecomment-2308237517

   I run into this recently. When constructing VALUES via API, the Alias 
expression can be thought to allow aliasing the VALUES columns, but this didn't 
work, alias got (silently) ignored. From such "unpleasant surprise" 
perspective, I would consider this as a bug.
   
   To me, alias is not an expression at all. It's a feature of a select clause 
and would be best modeled as such.
   
   > 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".
   
   
   


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