andygrove opened a new issue, #7374:
URL: https://github.com/apache/datafusion-comet/issues/7374

   ### What is the problem the feature request solves?
   
   Before submitting a query, the driver (#7289) replaces each scalar subquery 
in the plan with a literal of its result. It parses the serialized plan of 
every stage that holds a subquery, and every partition's own plan for a stage 
that reads files, walks them, and serializes them again. For a scan over many 
files, that is the bulk of the request, redone on the driver for every query.
   
   ### Describe the potential solution
   
   Send the results once, as `map<int64, Expr> subquery_results` on 
`QueryRequest` and `Fragment`. Have `PhysicalPlanner` look up 
`ExprStruct::Subquery` in that map when it plans a block with native inputs, 
where today it fails because there is no JVM. The driver would then serialize 
only the literals.
   
   ### Additional context
   
   The rewrite is `withSubqueryResults` in `CometNativeExecutorsExec.scala`.
   
   Part of #7288.
   
   ### Willingness to contribute
   
   Yes. I can contribute this feature independently.
   


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