hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gunt...@apache.org
Subject svn commit: r1627587 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
Date Thu, 25 Sep 2014 18:49:22 GMT
Author: gunther
Date: Thu Sep 25 18:49:22 2014
New Revision: 1627587

URL: http://svn.apache.org/r1627587
Log:
HIVE-8082: generateErrorMessage doesn't handle null ast properly (Rahul Palamuttam via Gunther
Hagleitner)

Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java?rev=1627587&r1=1627586&r2=1627587&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java Thu Sep 25
18:49:22 2014
@@ -642,6 +642,10 @@ public class SemanticAnalyzer extends Ba
 
   public static String generateErrorMessage(ASTNode ast, String message) {
     StringBuilder sb = new StringBuilder();
+    if (ast == null) {
+      sb.append("The abstract syntax tree is null");
+      return sb.toString();
+    }
     sb.append(ast.getLine());
     sb.append(":");
     sb.append(ast.getCharPositionInLine());



Mime
View raw message