nastra commented on code in PR #8909:
URL: https://github.com/apache/iceberg/pull/8909#discussion_r1419074476


##########
nessie/src/test/java/org/apache/iceberg/nessie/BaseTestIceberg.java:
##########
@@ -180,6 +188,32 @@ protected Table createTable(TableIdentifier 
tableIdentifier, Schema schema) {
     return catalog.createTable(tableIdentifier, schema);
   }
 
+  protected View createView(NessieCatalog nessieCatalog, TableIdentifier 
tableIdentifier) {
+    Schema schema = new Schema(StructType.of(required(1, "id", 
LongType.get())).fields());
+    return createView(nessieCatalog, tableIdentifier, schema);
+  }
+
+  protected View createView(
+      NessieCatalog nessieCatalog, TableIdentifier tableIdentifier, Schema 
schema) {
+    createMissingNamespaces(tableIdentifier);
+    return nessieCatalog
+        .buildView(tableIdentifier)
+        .withSchema(schema)
+        .withDefaultNamespace(tableIdentifier.namespace())
+        .withQuery("spark", "select * from ns.tbl")
+        .create();
+  }
+
+  protected View replaceView(NessieCatalog nessieCatalog, TableIdentifier 
identifier) {
+    Schema schema = new Schema(StructType.of(required(2, "age", 
Types.IntegerType.get())).fields());

Review Comment:
   ```suggestion
       Schema schema = new Schema(required(2, "age", Types.IntegerType.get())));
   ```



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to