zeroshade commented on code in PR #2525:
URL: https://github.com/apache/iceberg-go/pull/2525#discussion_r4542932631
##########
table/update_schema.go:
##########
@@ -1090,11 +1090,58 @@ func (u *UpdateSchema) BuildUpdates() ([]Update,
[]Requirement, error) {
DefaultNameMappingKey: string(mappingJSON),
}))
}
+ updates = append(updates,
parquetBloomPropertyUpdates(meta.props, u.schema, newSchema)...)
}
return updates, requirements, nil
}
+// Follow field IDs so a rename preserves the setting and a deleted column's
+// name can be reused without inheriting its Bloom filter policy.
+func parquetBloomPropertyUpdates(props iceberg.Properties, oldSchema,
newSchema *iceberg.Schema) []Update {
Review Comment:
This is the same logic as `compressionPropertyUpdates` in #2524, with only
the prefixes changed. On #2524 I asked for one generic
`columnPropertyUpdates(props, oldSchema, newSchema, prefixes)`, because Java's
[`SchemaUpdate.applyChangesToMetadata`](https://github.com/apache/iceberg/blob/014b3ce5ffbf7c1c51dabb144f4d94e45addcd88/core/src/main/java/org/apache/iceberg/SchemaUpdate.java#L507-L529)
handles every per-column property prefix in one pass.
If both PRs merge as they are, iceberg-go has two copies, `BuildUpdates`
makes two separate passes over the properties, and
`write.metadata.metrics.column.*` still doesn't follow renames or deletes.
Please add the generic helper in whichever of the two PRs lands first, and have
the other reuse it. Pass every supported prefix: `MetricsModeColumnConfPrefix`,
the bloom-filter enabled/fpp/ndv prefixes here, and the two compression
prefixes from #2524.
--
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]