nastra commented on code in PR #8147:
URL: https://github.com/apache/iceberg/pull/8147#discussion_r1276428032
##########
core/src/main/java/org/apache/iceberg/MetadataUpdate.java:
##########
@@ -23,11 +23,16 @@
import java.util.Map;
import java.util.Set;
import org.apache.iceberg.relocated.com.google.common.collect.ImmutableSet;
+import org.apache.iceberg.relocated.com.google.common.collect.Maps;
+import org.apache.iceberg.view.ImmutableViewMetadata;
+import org.apache.iceberg.view.ViewVersion;
-/** Represents a change to table metadata. */
+/** Represents a change to table/view metadata. */
public interface MetadataUpdate extends Serializable {
void applyTo(TableMetadata.Builder metadataBuilder);
+ default void applyTo(ImmutableViewMetadata.Builder viewMetadataBuilder) {}
Review Comment:
That's a fair and valid point and for builders where we'd need to have more
custom logic we might actually not use generated builders and write the builder
ourselves. Going forward I think there are two options:
1) leave `ViewMetadata` as Immutable but disable generating a builder. This
would still perform all validation checks when a `ViewMetadata` instance is
being created. This approach is currently implemented in this PR.
2) make `ViewMetadata` an actual class and implement it the same way as
`TableMetadata`. This approach is implemented in
https://github.com/nastra/iceberg/commit/01fd4fca5e53a371d48ba0540be449ba286eb9f2.
Let me know which one you'd prefer and I'll update this PR. For both cases
we'd have our own Builder implementation.
--
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]