deniskuzZ commented on code in PR #6088:
URL: https://github.com/apache/hive/pull/6088#discussion_r2454698626
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java:
##########
@@ -421,6 +421,33 @@ public static String charSetString(String charSetName,
String charSetString)
}
}
+ /**
+ *
+ * @param dbNameNode A root node that contains database fields
+ * @return Return a Pair object which includes catalogName and dbName
+ * @throws SemanticException
+ */
+ public static Pair<String, String> getCatDbNamePair(ASTNode dbNameNode)
throws SemanticException {
+ String catName = null;
+ String dbName;
+
+ if (dbNameNode.getChildCount() == 2) {
+ catName = unescapeIdentifier(dbNameNode.getChild(0).getText());
Review Comment:
why not apply unescapeIdentifier after the init block?
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java:
##########
@@ -421,6 +421,33 @@ public static String charSetString(String charSetName,
String charSetString)
}
}
+ /**
+ *
+ * @param dbNameNode A root node that contains database fields
+ * @return Return a Pair object which includes catalogName and dbName
+ * @throws SemanticException
+ */
+ public static Pair<String, String> getCatDbNamePair(ASTNode dbNameNode)
throws SemanticException {
+ String catName = null;
+ String dbName;
+
+ if (dbNameNode.getChildCount() == 2) {
+ catName = unescapeIdentifier(dbNameNode.getChild(0).getText());
Review Comment:
could we apply unescapeIdentifier after the init block?
--
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]