xhumanoid opened a new pull request, #5923:
URL: https://github.com/apache/datafusion-comet/pull/5923

   A subquery inside a dispatched subtree fails at runtime. `SELECT 
addOne((SELECT max(v) FROM t2)) FROM t` dies with "Subquery ... has not 
finished" from ScalarSubquery.doGenCode on the executor, after the plan has 
already committed to the kernel and can no longer fall back.
   
   canHandle claimed to support ExecSubqueryExpression on the grounds that the 
surrounding operator's waitForSubqueries populates the subquery's `result` 
before the dispatcher serializes the expression. That ordering never held: the 
dispatcher closure-serializes the tree during planning, while `result` is 
populated at execution time, so the deserialized copy on the executor always 
has an unset result. The existing reused-subquery test passes only because its 
subqueries sit under native parents (`addOne(x) + (SELECT ...)`), where they 
are evaluated natively and never reach a kernel.
   
   canHandle now refuses them, which turns the runtime failure into a plan-time 
Spark fallback, and the comment is corrected to say so.
   
   ## Which issue does this PR close?
   
   Closes #.
   
   ## How are these changes tested?
   
   add regression test
   failed without fix


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