Open andygrove opened 1 month ago
Shuffle is not a SQL operator like Project or Filter in Spark. It is not specified to Spark SQL but also a fundamental block in Spark distributed execution model. Spark has its designed mechanisms for shuffle. It is out of the range of Spark SQL. That's said, it is no way to simply add other SQL operator as a child node to ShuffleWriterExec
and expect they are executed as a stream.
What is the problem the feature request solves?
I noticed that we execute each query stage with two separate native plans.
For example, here is the first query stage for TPC-H q1:
We execute one plan for the aggregate:
We then stream those results back into the JVM and then stream them back out to the following native plan to perform the shuffle write:
Would it be possible to combine these so that we just have the following plan? This would avoid a lot of JNI back and forth between the aggregate and the shuffle write.
Describe the potential solution
No response
Additional context
No response