asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: fix NPE in SqlppAstPrintVisitor
Date Fri, 26 Aug 2016 04:07:06 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 52a9d992d -> 4e33cd95a


fix NPE in SqlppAstPrintVisitor

Change-Id: Ic5ac437366aa0eb2d60ceceeeba5b5f02d2946d2
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1114
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/4e33cd95
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/4e33cd95
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/4e33cd95

Branch: refs/heads/master
Commit: 4e33cd95a0003257d5114be4d2b5f7aca4996d3f
Parents: 52a9d99
Author: Till Westmann <tillw@apache.org>
Authored: Thu Aug 25 18:17:28 2016 -0700
Committer: Till Westmann <tillw@apache.org>
Committed: Thu Aug 25 21:06:39 2016 -0700

----------------------------------------------------------------------
 .../apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/4e33cd95/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
index 908f799..3880fa1 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/SqlppAstPrintVisitor.java
@@ -132,9 +132,10 @@ public class SqlppAstPrintVisitor extends QueryPrintVisitor implements
ISqlppVis
     public Void visit(Projection projection, Integer step) throws AsterixException {
         if (projection.star()) {
             out.println(skip(step) + "*");
+        } else {
+            projection.getExpression().accept(this, step);
+            out.println(skip(step) + projection.getName());
         }
-        projection.getExpression().accept(this, step);
-        out.println(skip(step) + projection.getName());
         return null;
     }
 


Mime
View raw message