Skip to content

Add support for setting field_id on nodes #509

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

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

CurtHagenlocher
Copy link
Contributor

There's currently no way to set the field_id when creating a new node. Ability to do this is required under some circumstances when writing Delta tables.

@CurtHagenlocher
Copy link
Contributor Author

I didn't add field_id to the RowOriented API because it seems like a more advanced feature; let me know if I should do that too.

Copy link
Contributor

@adamreeve adamreeve left a comment

Choose a reason for hiding this comment

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

👍 thanks Curt, this looks good to me.

I agree this doesn't need to be added to the row oriented API or the Column type as it's a more advanced feature. And we could always add it later if there's demand.

Comment on lines +681 to +682
ParquetSharp.Schema.GroupNode.GroupNode(string! name, ParquetSharp.Repetition repetition, System.Collections.Generic.IReadOnlyList<ParquetSharp.Schema.Node!>! fields, ParquetSharp.LogicalType? logicalType) -> void
ParquetSharp.Schema.GroupNode.GroupNode(string! name, ParquetSharp.Repetition repetition, System.Collections.Generic.IReadOnlyList<ParquetSharp.Schema.Node!>! fields, ParquetSharp.LogicalType? logicalType = null, int fieldId = -1) -> void
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 I was initially worried this was a breaking change, but it looks like this should maintain source and binary compatibility as the default value is part of the source API but not the ABI. For my own reference, there are docs on adding optional parameters at https://github.com/dotnet/roslyn/blob/main/docs/Adding%20Optional%20Parameters%20in%20Public%20API.md

@adamreeve adamreeve merged commit 95c8379 into G-Research:master Mar 14, 2025
31 checks passed
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.

2 participants