abstractdog commented on code in PR #5613:
URL: https://github.com/apache/hive/pull/5613#discussion_r1941978862
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java:
##########
@@ -330,6 +332,17 @@ public void analyze(ASTNode ast, Context ctx) throws
SemanticException {
initCtx(ctx);
init(true);
analyzeInternal(ast);
+ postAnalyze();
+ }
+
+ /**
+ * This method is called after analyzeInternal, assuming all the semantic
context is present (analyzeInternal is
+ * overridden by the subclasses of BaseSemanticAnalyzer).
+ * The reason why postAnalyze is private is that it's not supposed to be
overridden.
+ */
+ private void postAnalyze() {
Review Comment:
good catch! it works properly in endAnalysis too
handled in:
https://github.com/apache/hive/pull/5613/commits/812bb17b47d6f6f10deb706158e3959b38ddaea2
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/ParseUtils.java:
##########
@@ -786,6 +786,6 @@ private static Map<String, TypeInfo>
collectStructFieldNames(ASTNode structTypeN
* @param node the ASTNode
*/
public static String getNodeName(ASTNode node) {
- return node == null ? "" : node.getText().substring("TOK_".length());
+ return node == null || node.getText() == null ? "" :
node.getText().substring("TOK_".length());
Review Comment:
https://github.com/apache/hive/pull/5613/commits/812bb17b47d6f6f10deb706158e3959b38ddaea2
--
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]