Shruthirdy opened a new issue, #2734:
URL: https://github.com/apache/iceberg-go/issues/2734
### Feature Request / Improvement
Follow-up from the review on #2585.
The check that rejects duplicate field IDs, including 0 and negatives, now
exists three times:
- `checkFieldIDs(..., true)` in `schema.go`, used by `Schema.UnmarshalJSON`
- `checkUniqueFieldIDs` in `table/metadata_schema_compatibility.go`, used by
`NewMetadata` and `MetadataBuilder.AddSchema`
- `checkUniqueFieldIDs` in `view/metadata_builder.go`, a copy of the table
one,
used by the view builder
`view` can't call the unexported `table` helper, and `table/internal` isn't
importable from `view`, so #2585 added a copy.
### Approach
Move the `table`/`view` walker into a small package under the top-level
`internal/`, and have both call it, as suggested in the #2585 review. It
stays
out of the public API (#2062). The root package keeps its own
`checkFieldIDs`,
since it can't import a package that imports it.
The view tests only cover top-level duplicates today, this would also add the
list element, map key and map value cases the table tests already have.
No behaviour change.
I'd like to work on this and will raise a PR for this soon.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]