Skip to content

Conversation

@juliuszsompolski
Copy link
Contributor

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (fill in here)

Description

Add support for detecting DataFrameWriter V1 calls via the explicit isDataFrameWriterV1 option provided by Spark 4.1 in apache/spark#53173, while maintaining backward compatibility with stack trace inspection for older Spark versions.

This allows Delta to differentiate between DataFrameWriter V1 and V2 API calls in Spark Connect mode where stack trace inspection no longer works.

This has been an existing horrible hack in Delta. Having Spark pass it as an option is a leaky solution. However, at this point this is an emergency fix, as releasing Spark 4.1 as is would cause data corruption issues with Delta in DataFrameWriter saveAsTable in overwrite mode, as it would not be correctly interpreting it's overwriteSchema mode.

How was this patch tested?

It has been tested with tests that are not part of the PR. To properly test in connect mode, changes are needed on both Spark and Delta side and integrating it will be done as followup work.

Does this PR introduce any user-facing changes?

No.

Add support for detecting DataFrameWriter V1 calls via the explicit
isDataFrameWriterV1 option provided by Spark 4.1, while maintaining
backward compatibility with stack trace inspection for older Spark versions.

This allows Delta to differentiate between DataFrameWriter V1 and V2 API
calls in Spark Connect mode where stack trace inspection no longer works.
@juliuszsompolski
Copy link
Contributor Author

Superseeded by #5579

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.

1 participant