zeroshade commented on code in PR #1069:
URL: https://github.com/apache/iceberg-go/pull/1069#discussion_r3253655067
##########
table/metadata.go:
##########
@@ -1363,6 +1363,22 @@ var (
ErrPartitionSpecNotFound = errors.New("partition spec not found")
)
+type v3FieldCheck struct {
+ name string
+ present bool
+}
+
+func rejectV3OnlyFields(version int, checks ...v3FieldCheck) error {
+ for _, c := range checks {
+ if c.present {
+ return fmt.Errorf("%w: v3-only field '%s' present in
v%d metadata",
+ ErrInvalidMetadataFormatVersion, c.name,
version)
Review Comment:
should we use `errors.Join` so that we can report *all* the fields we're
rejecting at once instead of piece-meal?
--
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]