mchades commented on code in PR #11288:
URL: https://github.com/apache/gravitino/pull/11288#discussion_r3339198200


##########
catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveViewCatalogOperations.java:
##########
@@ -418,27 +429,31 @@ private SQLRepresentation validateSQLRepresentation(
             defaultSchema,
             ident);
         return selected;
+      case Dialects.SPARK:

Review Comment:
   When `representation.dialect()` is `"spark"`, `detectDialect` identifies the 
view as Spark on reload only if `spark.sql.create.version` is present in the 
HMS table parameters — but `createView()` does not validate that this key 
exists. If a caller omits it, the view silently round-trips as Hive dialect and 
`defaultCatalog`/`defaultSchema` will not be restored on load.
   
   Consider adding a validation here for the Spark case: require 
`spark.sql.create.version` to be present in `params`, and throw 
`IllegalArgumentException` with a clear message if it is missing.



-- 
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]

Reply via email to