rdblue commented on code in PR #7880:
URL: https://github.com/apache/iceberg/pull/7880#discussion_r1315217066


##########
core/src/main/java/org/apache/iceberg/BaseMetastoreCatalog.java:
##########
@@ -312,4 +325,182 @@ private MetricsReporter metricsReporter() {
 
     return metricsReporter;
   }
+
+  protected ViewOperations newViewOps(TableIdentifier identifier) {
+    throw new UnsupportedOperationException("Not implemented: newViewOps");
+  }
+
+  @Override
+  public List<TableIdentifier> listViews(Namespace namespace) {
+    throw new UnsupportedOperationException("Not implemented: listViews");
+  }
+
+  @Override
+  public View loadView(TableIdentifier identifier) {
+    View result;
+    if (isValidIdentifier(identifier)) {
+      ViewOperations ops = newViewOps(identifier);
+      if (ops.current() == null) {
+        throw new NoSuchViewException("View does not exist: %s", identifier);
+      } else {
+        result = new BaseView(newViewOps(identifier), fullTableName(name(), 
identifier));
+      }
+    } else {
+      throw new NoSuchViewException("Invalid view identifier: %s", identifier);
+    }
+
+    LOG.info("View loaded by catalog: {}", result);
+    return result;
+  }
+
+  @Override
+  public boolean dropView(TableIdentifier identifier) {
+    throw new UnsupportedOperationException("Not implemented: dropView");
+  }
+
+  @Override
+  public void renameView(TableIdentifier from, TableIdentifier to) {
+    throw new UnsupportedOperationException("Not implemented: renameView");
+  }
+
+  @Override
+  public ViewBuilder buildView(TableIdentifier identifier) {
+    return new BaseViewBuilder(identifier);
+  }
+
+  protected class BaseViewBuilder implements ViewBuilder {
+    private final TableIdentifier identifier;
+    private final ImmutableViewVersion.Builder viewVersionBuilder = 
ImmutableViewVersion.builder();
+    private final List<ViewRepresentation> viewRepresentations = 
Lists.newArrayList();
+    private Schema schema;
+    private final Map<String, String> properties = Maps.newHashMap();
+
+    public BaseViewBuilder(TableIdentifier identifier) {

Review Comment:
   Does this need to be public or could we use `protected` to allow people to 
extend it?



-- 
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]

Reply via email to