Skip to content

Conversation

@jonathanc-n
Copy link
Contributor

@jonathanc-n jonathanc-n commented Mar 3, 2025

Which issue does this PR close?

What changes are included in this PR?

Added option for checking duplicates when adding parquet files.


/// Finished building the action and apply it to the transaction.
pub async fn apply(self) -> Result<Transaction<'a>> {
pub async fn apply(self, check_duplicate: bool) -> Result<Transaction<'a>> {
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 add an option in FileAppendAction rather in apply method, since this approach can't be extended to more options.

struct FileAppendAction {
   check_duplicate: bool
}

impl FileAppendAction {
   pub fn check_duplicate(v: bool) -> Self {
      this.check_duplicate = v;
      self
   }
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@liurenjie1024 Thanks, should be good now 👍

@liurenjie1024
Copy link
Contributor

Thanks @jonathanc-n for this pr!

@liurenjie1024 liurenjie1024 merged commit f0150d5 into apache:main Mar 12, 2025
17 checks passed
ZENOTME pushed a commit to risingwavelabs/iceberg-rust that referenced this pull request Mar 12, 2025
…1034)

## Which issue does this PR close?

- Closes apache#1031.

## What changes are included in this PR?
Added option for checking duplicates when adding parquet files.
@jonathanc-n jonathanc-n deleted the check-duplicate branch March 28, 2025 22:44
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.

Add an option to skip checking duplicated files when adding existing file in FastAppendAction.

2 participants