huaxingao commented on code in PR #14909:
URL: https://github.com/apache/iceberg/pull/14909#discussion_r2648741008
##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/TestSparkSessionCatalog.java:
##########
@@ -98,4 +104,42 @@ public void testLoadFunction() {
// TODO: fix loading Iceberg built-in functions in SessionCatalog
}
+
+ @Test
+ public void testCreateViewIfNotExistsWithExistingHiveView() {
+ String viewName = "default.existing_hive_view";
+
+ resetSparkCatalog();
+ try {
+ // create Hive view
+ sql("CREATE VIEW %s AS SELECT 1 AS id", viewName);
+ } finally {
+ setUpCatalog();
+ }
+
+ try {
+ sql("CREATE VIEW IF NOT EXISTS %s AS SELECT 2 AS id", viewName);
Review Comment:
Does this exercise `SparkSessionCatalog#createView(ViewInfo)`? In my
environment, CREATE VIEW is planned as V1 `CreateViewCommand` (not the V2
`ViewCatalog` path), so the tests may pass without hitting the code change.
--
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]