deniskuzZ commented on code in PR #6267:
URL: https://github.com/apache/hive/pull/6267#discussion_r3068029854


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/catalog/create/CreateCatalogAnalyzer.java:
##########
@@ -67,10 +73,31 @@ public void analyzeInternal(ASTNode root) throws 
SemanticException {
       }
     }
 
+    // Initialize props if null, and set default type to native if not 
specified
+    if (props == null) {
+      props = new HashMap<>();
+    }
+    checkCatalogType(props);
+
     CreateCatalogDesc desc = new CreateCatalogDesc(catalogName, comment, 
locationUrl, ifNotExists, props);
     Catalog catalog = new Catalog(catalogName, locationUrl);
 
     rootTasks.add(TaskFactory.get(new DDLWork(getInputs(), getOutputs(), 
desc)));
     outputs.add(new WriteEntity(catalog, WriteEntity.WriteType.DDL_NO_LOCK));
   }
+
+  private static void checkCatalogType(Map<String, String> props) throws 
SemanticException {
+    String catalogType = props.get("type");

Review Comment:
   could we please create constant for that



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

Reply via email to