stuxuhai commented on code in PR #14909:
URL: https://github.com/apache/iceberg/pull/14909#discussion_r2648806939
##########
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:
Thanks for the review. The change is intended to be exercised with Iceberg
Spark extensions enabled:
`spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions`.
I missed documenting this prerequisite in the PR description. Apologies for
missing 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]