nastra commented on code in PR #7880:
URL: https://github.com/apache/iceberg/pull/7880#discussion_r1247983974
##########
api/src/main/java/org/apache/iceberg/view/ViewBuilder.java:
##########
@@ -111,6 +111,16 @@ public interface ViewBuilder {
*/
ViewBuilder withProperty(String key, String value);
+ /**
+ * Add a view representation
+ *
+ * @param representation The view representation to add
+ * @return this for method chaining
+ */
+ default ViewBuilder withRepresentation(ViewRepresentation representation) {
Review Comment:
yes I agree, the current version of `ViewBuilder` is a bit awkward, because
you're not able to specify multiple representations, when you create or replace
the view. I was thinking that we deprecate the representation-specific methods
in `ViewBuilder` so that we end up with:
```
public interface ViewBuilder {
ViewBuilder withSchema(Schema schema);
default ViewBuilder withRepresentation(ViewRepresentation representation) {
throw new UnsupportedOperationException("Adding a view representation is
not supported");
}
View create();
View replace();
View createOrReplace();
//... other old deprecated methods
}
```
--
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]