chore(refactor) refactor ManifestWriterBuilder to take Box<dyn FileWrite> and location#2568
Open
xanderbailey wants to merge 2 commits into
Open
chore(refactor) refactor ManifestWriterBuilder to take Box<dyn FileWrite> and location#2568xanderbailey wants to merge 2 commits into
xanderbailey wants to merge 2 commits into
Conversation
…ite> and location
b83e6bb to
d69e4c5
Compare
blackmwk
reviewed
Jun 2, 2026
| /// Create a new builder. | ||
| pub fn new( | ||
| output: OutputFile, | ||
| writer: Box<dyn FileWrite>, |
Contributor
There was a problem hiding this comment.
We don't need to this breaking api change, instead, we could add a new method to accept encrypted output file, and these two methods share same function which accepts FileWriter.
Contributor
Author
There was a problem hiding this comment.
Not sure I quite follow sorry, is that to say we keep this constructor and store something like:
writer: Pin<Box<dyn Future<Output = Result<Box<dyn FileWrite>>> + Send>>
in the struct and have a new constructor:
pub fn new_from_encrypted(
encrypted_output: EncryptedOutputFile,
snapshot_id: Option<i64>,
key_metadata: Option<Vec<u8>>,
schema: SchemaRef,
partition_spec: PartitionSpec,
) -> Self {
let location = encrypted_output.location().to_owned();
Self {
writer_future: Box::pin(async move { encrypted_output.writer().await }),
location,
snapshot_id,
key_metadata,
schema,
partition_spec,
}
}
?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Working towards: #2034
What changes are included in this PR?
Similar reasons to #2564. For the current encryption work we will construct a FileWrite to do transparent encryption on write, this means we need to change the constructor of the
ManifestWriterBuilderto now take both aBox<dyn FileWrite>and alocation.Are these changes tested?