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

feat: Add equality delete writer #372

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Dysprosium0626
Copy link
Contributor

Close #341
EqualityDeleteWriter refers tohttps://iceberg.apache.org/spec/#equality-delete-files

This pr complete the implementation of EqualityDeleteWriter and its test case

impl<B: FileWriterBuilder> IcebergWriter for EqualityDeleteFileWriter<B> {
async fn write(&mut self, batch: RecordBatch) -> Result<()> {
let batch = self.project_record_batch_columns(batch)?;
self.inner_writer.as_mut().unwrap().write(&batch).await
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use ? rather than unwrap() here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

? is for Result but self.inner_writer is an Option. I think it is reasonable to leave it just Option. Maybe self.inner_writer.as_mut().ok_or_else(...).write(&batch).await is better?

@Dysprosium0626
Copy link
Contributor Author

@ZENOTME @sdd PTAL! Thanks a lot!

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 the equality delete writer
3 participants