Skip to content

Conversation

@cloud-fan
Copy link
Contributor

backport #50040 to 3.5

What changes were proposed in this pull request?

Unlike DataFrameWriter.saveAsTable where we explicitly get the "path" option and treat it as table location, DataFrameWriterV2 doesn't do it and treats the "path" option as a normal option which doesn't have any real impact.

This PR fixes it, and adds a legacy config to restore the old behavior.

Why are the changes needed?

bug fix

Does this PR introduce any user-facing change?

Yes, now DataFrameWriterV2 can correctly write data to the specified path for file source tables.

How was this patch tested?

new test

Was this patch authored or co-authored using generative AI tooling?

no

Unlike `DataFrameWriter.saveAsTable` where we explicitly get the "path" option and treat it as table location, `DataFrameWriterV2` doesn't do it and treats the "path" option as a normal option which doesn't have any real impact.

This PR fixes it, and adds a legacy config to restore the old behavior.

bug fix

Yes, now `DataFrameWriterV2` can correctly write data to the specified path for file source tables.

new test

no

Closes apache#50040 from cloud-fan/prop.

Lead-authored-by: Wenchen Fan <cloud0fan@gmail.com>
Co-authored-by: Wenchen Fan <wenchen@databricks.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
(cherry picked from commit a3671e5)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
@github-actions github-actions bot added the SQL label Mar 6, 2025
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making a PR again. Could you make CI happy?

@cloud-fan
Copy link
Contributor Author

It seems like a bug in sbt or sbtunidoc and it tries to generate API doc for generated java classes in the target director. Unfortunately I don't know how to fix this...

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM. Thank you, @cloud-fan .
Merged to branch-3.5.

dongjoon-hyun pushed a commit that referenced this pull request Mar 15, 2025
backport #50040 to 3.5

### What changes were proposed in this pull request?

Unlike `DataFrameWriter.saveAsTable` where we explicitly get the "path" option and treat it as table location, `DataFrameWriterV2` doesn't do it and treats the "path" option as a normal option which doesn't have any real impact.

This PR fixes it, and adds a legacy config to restore the old behavior.

### Why are the changes needed?

bug fix

### Does this PR introduce _any_ user-facing change?

Yes, now `DataFrameWriterV2` can correctly write data to the specified path for file source tables.

### How was this patch tested?

new test

### Was this patch authored or co-authored using generative AI tooling?

no

Closes #50179 from cloud-fan/backport.

Authored-by: Wenchen Fan <cloud0fan@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants