rluvaton commented on issue #21231:
URL: https://github.com/apache/datafusion/issues/21231#issuecomment-4164600743

   > A lambda function defines a new naming scope. [..] I’m also thinking 
something along the lines of a tree traversal where the schema can change in 
the downward phase, and indices can be remapped in the upward phase. You would 
need to have the schema available for this though, which is not the case when 
the projection logic is currently triggered.
   
   what I'm saying is that for you should stay in the same scope as the case 
expression, if some child expression create a new scope, you should not get 
into that scope. and therefor should not have the schema available
   
   all you need is for expression that create a new scope to not return their 
children
   
   so for `array_transform(<expr>, value -> <expr-2>)`, array_transform 
expression will only return <expr-1> and not the lambda, since the lambda is a 
new scope


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