Skip to content

Conversation

@Shekharrajak
Copy link

Which issue does this PR close?

Closes #2904

Rationale for this change

Benchmarks show that Comet columnar shuffle with complex/nested types (struct, array, map) is significantly slower than Spark's default shuffle. This PR adds a configuration flag to disable columnar shuffle for complex types, falling back to Spark shuffle for better performance until the underlying performance issues can be addressed.

What changes are included in this PR?

Add spark.comet.columnar.shuffle.complexTypes.enabled config (default: false)
When disabled, queries with complex types in the shuffle schema fall back to Spark shuffle
Update columnarShuffleSupported() to check this config for StructType, ArrayType, and MapTyp

How are these changes tested?

Updated existing columnar shuffle tests for complex types to explicitly enable the new config
Added new test "Fallback to Spark for complex types when config is disabled (default)" that verifies struct, array, and map types fall back to Spark shuffle when the config is disabled

@andygrove
Copy link
Member

It may be worth enabling COMET_COLUMNAR_SHUFFLE_COMPLEX_TYPES_ENABLED in CometTestBase

@Shekharrajak Shekharrajak force-pushed the fix/issue-2904-columnar-shuffle-complex-types branch from 00fe67f to dee4966 Compare December 27, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Columnar shuffle with nested types is slower than Spark

2 participants