rdblue commented on code in PR #9423:
URL: https://github.com/apache/iceberg/pull/9423#discussion_r1464146096
##########
spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestViews.java:
##########
@@ -139,24 +139,9 @@ public void readFromMultipleViews() throws
NoSuchTableException {
insertRows(6);
String viewName = "firstView";
String secondView = "secondView";
- String viewSQL = String.format("SELECT id FROM %s WHERE id <= 3",
tableName);
- String secondViewSQL = String.format("SELECT id FROM %s WHERE id > 3",
tableName);
- ViewCatalog viewCatalog = viewCatalog();
-
- viewCatalog
- .buildView(TableIdentifier.of(NAMESPACE, viewName))
- .withQuery("spark", viewSQL)
- .withDefaultNamespace(NAMESPACE)
- .withSchema(schema(viewSQL))
- .create();
-
- viewCatalog
- .buildView(TableIdentifier.of(NAMESPACE, secondView))
- .withQuery("spark", secondViewSQL)
- .withDefaultNamespace(NAMESPACE)
- .withSchema(schema(secondViewSQL))
- .create();
+ sql("CREATE VIEW %s AS SELECT id FROM %s WHERE id <= 3", viewName,
tableName);
+ sql("CREATE VIEW %s AS SELECT id FROM %s WHERE id > 3", secondView,
tableName);
Review Comment:
I don't think this should be changed. I like that it was previously isolated
so that we weren't relying on Spark for this.
--
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]