neilconway commented on issue #3781:
URL: https://github.com/apache/datafusion/issues/3781#issuecomment-3917203388

   @andygrove Looking at your suggestion for the optimizer trait, it sounds 
like you had in mind that the logical optimization would evaluate the subquery, 
rather than doing evaluation at execution time. My initial plan was to take a 
different approach; at a high-level, basically:
   
   (A) Preserve the scalar subquery expr during logical planning
   (B) Optimize the subquery independently during physical optimization
   (C) Execute the subquery once as part of executing the main plan and cache 
the result
   (D) To evaluate the scalar subquery expression, arrange to lookup and return 
the result of (C)
   
   Obviously lots of details to fill in, but lmk if you fundamentally disagree 
with this approach or if you think evaluating the subquery during logical 
optimization is preferable.


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