perf: Improve query planning to more reliably fall back to columnar shuffle when native shuffle is not supported #1209
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #1208
Rationale for this change
For TPC-H q16, Comet was falling back to Spark shuffle when native shuffle was not supported, rather than falling back to Comet Columnar Shuffle.
Here are timings for 5 runs of q16:
Main Branch
This PR
What changes are included in this PR?
Improve query planning logic to try native first, then columnar, then Spark.
The original code had separate match arms for native shuffle and columnar shuffle. If the native shuffle arm was chosen and then it was determined that the input plan was not native, we would fall back to Spark.
The new code has a single match arm that tries native first, then columnar, before falling back to Spark.
How are these changes tested?