gh-yzou commented on code in PR #1427:
URL: https://github.com/apache/polaris/pull/1427#discussion_r2059540619


##########
plugins/spark/v3.5/integration/src/intTest/java/org/apache/polaris/spark/quarkus/it/SparkCatalogBaseIT.java:
##########
@@ -258,4 +260,94 @@ void testListViews() throws Exception {
     viewCatalog.dropView(Identifier.of(l1ns, view1Name));
     namespaceCatalog.dropNamespace(l1ns, true);
   }
+
+  @Test
+  void testIcebergTableViewMix() throws Exception {
+    // initiate two namespaces with nesting
+    String[] l1ns = new String[] {"ns"};
+    namespaceCatalog.createNamespace(l1ns, Maps.newHashMap());
+    // create a new namespace under the ns
+    String[] l2ns = new String[] {"ns", "nsl2"};
+    namespaceCatalog.createNamespace(l2ns, Maps.newHashMap());
+
+    StructType iceberg_schema =
+        new StructType().add("isManaged", "boolean").add("people", "string");
+
+    // create two iceberg tables under ns
+    Identifier l1tb1 = Identifier.of(l1ns, "iceberg_table1");
+    tableCatalog.createTable(l1tb1, iceberg_schema, new Transform[0], 
Maps.newHashMap());
+
+    Identifier l1tb2 = Identifier.of(l1ns, "iceberg_table2");
+    Map<String, String> icebergProperties = Maps.newHashMap();
+    icebergProperties.put(PolarisCatalogUtils.TABLE_PROVIDER_KEY, "iceberg");
+    tableCatalog.createTable(l1tb2, iceberg_schema, new Transform[0], 
icebergProperties);
+
+    // create one iceberg view under ns
+    Identifier l1view = Identifier.of(l1ns, "test_view1");
+    String view1SQL = "select id from iceberg_table1 where isManaged = 'true'";

Review Comment:
   There is no specific meaning for isManaged, i was mainly just trying to 
create a view string, i updated to use an int type to avoid confusion.



##########
plugins/spark/v3.5/integration/src/intTest/java/org/apache/polaris/spark/quarkus/it/SparkCatalogIcebergIT.java:
##########
@@ -45,4 +55,20 @@ protected SparkSession.Builder 
withCatalog(SparkSession.Builder builder, String
             String.format("spark.sql.catalog.%s.s3.secret-access-key", 
catalogName), "fakesecret")
         .config(String.format("spark.sql.catalog.%s.s3.region", catalogName), 
"us-west-2");
   }
+
+  @ParameterizedTest
+  @ValueSource(strings = {"delta", "csv"})
+  public void testNoneIcebergTableOperationsFails(String provider) throws 
Exception {

Review Comment:
   updated



-- 
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...@polaris.apache.org

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

Reply via email to