Skip to content

fix: multi-insert with native writer in Spark 4.x (#3430)#3530

Open
Shekharrajak wants to merge 4 commits into
apache:mainfrom
Shekharrajak:fix/3430-spark4-multi-insert-native-writer
Open

fix: multi-insert with native writer in Spark 4.x (#3430)#3530
Shekharrajak wants to merge 4 commits into
apache:mainfrom
Shekharrajak:fix/3430-spark4-multi-insert-native-writer

Conversation

@Shekharrajak
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #3430.

Rationale for this change

SPARK-48817 multi-insert test fails in Spark 4.x with native writer enabled. The requiresNativeChildren check doesn't handle ReusedExchangeExec (used to share shuffles in multi-insert) and QueryStageExec (AQE wrapper operators).

What changes are included in this PR?

  • Added producesArrowData() helper that recursively unwraps ReusedExchangeExec, ShuffleQueryStageExec, BroadcastQueryStageExec and checks for CometExec.

How are these changes tested?

Added test case parquet write with multi-insert pattern in CometParquetWriterSuite.

@Shekharrajak Shekharrajak changed the title Fix multi-insert with native writer in Spark 4.x (#3430) fix: multi-insert with native writer in Spark 4.x (#3430) Feb 18, 2026
@Shekharrajak
Copy link
Copy Markdown
Contributor Author

@coderfender, Please have a look. I think this code changes will resolve multiple issues of writer.

@Shekharrajak
Copy link
Copy Markdown
Contributor Author

CI checks looking fine.

Comment thread spark/src/test/scala/org/apache/comet/parquet/CometParquetWriterSuite.scala Outdated
@Shekharrajak Shekharrajak force-pushed the fix/3430-spark4-multi-insert-native-writer branch from e1846e4 to ec52f07 Compare March 16, 2026 18:26
@Shekharrajak Shekharrajak force-pushed the fix/3430-spark4-multi-insert-native-writer branch from 9586bec to 77bb427 Compare March 16, 2026 19:22
@github-actions
Copy link
Copy Markdown

Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.

@github-actions github-actions Bot added the Stale label May 16, 2026
@github-actions github-actions Bot removed the Stale label May 18, 2026
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.

[COMET NATIVE WRITER] SPARK-48817: test multi inserts

2 participants