Skip to content

Conversation

CTTY
Copy link
Contributor

@CTTY CTTY commented Sep 3, 2025

Which issue does this PR close?

What changes are included in this PR?

Are these changes tested?

not yet

self.data_file_builders.extend(inner.close().await?);

// Start a new writer
// TODO how to pass partition key to inner builder??
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @liurenjie1024 ,

I think we've discussed a while ago that we don't really need a new PartitionWriter trait, as using the decorator pattern should be enough, but I'm having second thought here: it's tricky to configure PartitionKey for the inner_builder without changing the FileBuilder trait.. I feel like we need to change at least the FileWriterBuilder trait:

trait FileWriterBuilder {
...
fn with_partition_key();
}

Would love to hear your thoughts!

Copy link
Contributor

Choose a reason for hiding this comment

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

The inner field doesn't have to be a trait, we can use RollingFileWriter directly. The RollingFileWriter returns DataFileBuilder, and in the way we can set the partition spec?

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.

Implement clustered partitioned data writer.
2 participants