alamb commented on issue #6790:
URL: 
https://github.com/apache/arrow-datafusion/issues/6790#issuecomment-1624191231

   > This involves a design problem. we shouldn't use name as a references to 
get a column from child plan, we should use id to get a column from child plan.
   
   I believe this is also what Postgres does (refers to columns by id, rather 
than a name)
   
   Also, interestingly, this is what DataFusion `PhyicalExpr` do as well. 
   
   
   > In my opinion, it is unnecessary to keep Schema unchanged at the 
Optimization stage, because in the process of optimization, it indeed may 
change.
   
   > qualifier/name change: such as simplify_expr
   
   I somehow feel this should be fixable with `Alias`es but as you point out 
this apparently is tricky
   
   > nullable change: such as infer not null from predicate
    
   This is a good point
   
   
   > type change: such as https://github.com/apache/arrow-datafusion/pull/6862
   
   In my opinion, the type (other than nullable) should never change after we 
do the Analysis phase. Otherwise we could end up getting to the physical 
expressions and not having the types line up
   


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

Reply via email to