diqiu50 commented on code in PR #11189:
URL: https://github.com/apache/gravitino/pull/11189#discussion_r3301722981
##########
catalogs/catalog-hive/src/main/java/org/apache/gravitino/catalog/hive/HiveViewCatalogOperations.java:
##########
@@ -405,34 +406,37 @@ private SQLRepresentation validateSQLRepresentation(
firstRepresentation == null ? "null" :
firstRepresentation.getClass().getSimpleName());
SQLRepresentation selected = (SQLRepresentation) firstRepresentation;
- boolean isHiveDialect = Dialects.HIVE.equalsIgnoreCase(selected.dialect());
- if (isHiveDialect) {
- Preconditions.checkArgument(
- defaultCatalog == null && defaultSchema == null,
- "Hive dialect '%s' does not support non-null
defaultCatalog/defaultSchema, but got "
- + "defaultCatalog=%s, defaultSchema=%s for view %s",
- Dialects.HIVE,
- defaultCatalog,
- defaultSchema,
- ident);
- return selected;
+ switch (selected.dialect().toLowerCase(java.util.Locale.ROOT)) {
+ case Dialects.HIVE:
+ case Dialects.FLINK:
+ Preconditions.checkArgument(
+ defaultCatalog == null && defaultSchema == null,
+ "Dialect '%s' does not support non-null
defaultCatalog/defaultSchema, but got "
+ + "defaultCatalog=%s, defaultSchema=%s for view %s",
+ selected.dialect(),
Review Comment:
Yes, full names are used in the view sql
--
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]