Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-50287][SQL] Merge options of table and relation when creating WriteBuilder in FileTable #48821

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented Nov 12, 2024

What changes were proposed in this pull request?

Merge options of table and relation when creating WriteBuilder in FileTable.

Why are the changes needed?

Similar to SPARK-49519 which fixes the read path.

Does this PR introduce any user-facing change?

FileTable's options are accounted on the V2 write path now, but given the built-in file formats use V1 by default, it has no real effect.

How was this patch tested?

UT is updated to cover the case.

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

No.

@pan3793
Copy link
Member Author

pan3793 commented Nov 13, 2024

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, @pan3793 .

@@ -39,10 +39,17 @@ case class TextTable(
override def inferSchema(files: Seq[FileStatus]): Option[StructType] =
Some(StructType(Array(StructField("value", StringType))))

override def newWriteBuilder(info: LogicalWriteInfo): WriteBuilder =
override def newWriteBuilder(info: LogicalWriteInfo): WriteBuilder = {
val writeInfo = LogicalWriteInfoImpl(
Copy link
Contributor

Choose a reason for hiding this comment

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

shall we have one method in the parent class to create LogicalWriteInfoImpl?

Copy link
Member Author

Choose a reason for hiding this comment

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

updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants