Skip to content

[Variant] Add flag in ObjectBuilder to control validation behavior on duplicate field write#7801

Merged
alamb merged 8 commits intoapache:mainfrom
micoo227:dupe-field-write-flag
Jul 1, 2025
Merged

[Variant] Add flag in ObjectBuilder to control validation behavior on duplicate field write#7801
alamb merged 8 commits intoapache:mainfrom
micoo227:dupe-field-write-flag

Conversation

@micoo227
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #7777.

What changes are included in this PR?

Added method with_validate_unique_fields that modifies an ObjectBuilder to throw an error in finish if duplicate fields were inserted. The error message thrown displays all of the duplicate keys that were inserted to the object.

@github-actions github-actions Bot added the parquet Changes to the parquet crate label Jun 27, 2025
Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @micoo227 -- this looks really neat. I have a few comments -- let me know what you think

cc @scovich and @friendlymatthew

Comment thread parquet-variant/src/builder.rs Outdated
Comment thread parquet-variant/src/builder.rs Outdated
Comment thread parquet-variant/src/builder.rs Outdated
Comment thread parquet-variant/src/builder.rs Outdated
Comment thread parquet-variant/src/builder.rs Outdated
@micoo227 micoo227 force-pushed the dupe-field-write-flag branch from d47c92c to 9e39936 Compare June 28, 2025 20:28
@micoo227
Copy link
Copy Markdown
Contributor Author

Hi @alamb -- thanks for the feedback! I applied the changes you requested and rebased onto main. Let me know if there are any other changes you'd like me to make

Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @micoo227 -- this looks great to me

@scovich and @friendlymatthew do you have some time to review this PR as well?

Comment thread parquet-variant/src/builder.rs Outdated
Comment thread parquet-variant/src/builder.rs Outdated
Comment thread parquet-variant/src/builder.rs Outdated
Copy link
Copy Markdown
Contributor

@friendlymatthew friendlymatthew left a comment

Choose a reason for hiding this comment

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

Thanks @micoo227, I just had a few comments

@micoo227
Copy link
Copy Markdown
Contributor Author

Thanks for taking a look @friendlymatthew! I reworked the PR to address your requested changes

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Jun 30, 2025

@friendlymatthew are you happy with this PR now?

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Jun 30, 2025

I merged this PR up to resolve a conflict

@friendlymatthew
Copy link
Copy Markdown
Contributor

Thanks for taking a look @friendlymatthew! I reworked the PR to address your requested changes

Thank you very much!!

@alamb alamb changed the title Add flag in ObjectBuilder to control validation behavior on duplicate field write [Variant] Add flag in ObjectBuilder to control validation behavior on duplicate field write Jul 1, 2025
@alamb alamb merged commit 2405798 into apache:main Jul 1, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parquet Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Variant] Add flag in ObjectBuilder to control validation behavior on duplicate field write

3 participants