Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-45133][CONNECT] Make Spark Connect queries be FINISHED when la…
…st result task is finished ### What changes were proposed in this pull request? In the situation before, query will only be FINISHED when all results have been pushed into the output buffers (not necessarily received by client, but pushed out of the server). For LocalTableScanExec, post FINISHED before sending result batches, because nothing is executed, only cached local results are returned. For regular execution, post FINISHED after all task results have been returned from Spark, not after they have been processed and sent out. ### Why are the changes needed? Currently, even if a query finished running in Spark, it keeps being RUNNING until all results are sent. Then there is a very small difference between FINISHED and CLOSED. This change makes it behave more similar to e.g. Thriftserver. ### Does this PR introduce _any_ user-facing change? Yes. Queries will be posted as FINISHED when they finish executing, not when they finish sending results. ### How was this patch tested? Will add test in #42560 ### Was this patch authored or co-authored using generative AI tooling? No. Closes #42889 from juliuszsompolski/SPARK-45133. Authored-by: Juliusz Sompolski <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
- Loading branch information