asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: ASTERIXDB-1515: fix the NPE.
Date Wed, 06 Jul 2016 03:35:23 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 7f30303c3 -> 640705a79


ASTERIXDB-1515: fix the NPE.

Change-Id: I39412b02d503866588990020af1ea3252e83e1a0
Reviewed-on: https://asterix-gerrit.ics.uci.edu/976
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>


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

Branch: refs/heads/master
Commit: 640705a79a58518dd78dc60154445868a20558d9
Parents: 7f30303
Author: Yingyi Bu <yingyi@couchbase.com>
Authored: Tue Jul 5 17:13:24 2016 -0700
Committer: Till Westmann <tillw@apache.org>
Committed: Tue Jul 5 20:34:56 2016 -0700

----------------------------------------------------------------------
 .../queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp | 2 +-
 .../asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml   | 2 +-
 .../sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/640705a7/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp
index 5f0148b..ac2562f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp
@@ -28,5 +28,5 @@ declare function abc(y) {
 };
 
 let z =y
-select element z
+select element z;
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/640705a7/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index a34689e..f2d5704 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -6534,7 +6534,7 @@
     <test-case FilePath="user-defined-functions">
       <compilation-unit name="udf30">
         <output-dir compare="Text">udf30</output-dir>
-        <expected-error>Error:</expected-error>
+        <expected-error>org.apache.hyracks.algebricks.common.exceptions.AlgebricksException:
Undefined alias (variable) reference for identifier y</expected-error>
       </compilation-unit>
     </test-case>
     <test-case FilePath="user-defined-functions">

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/640705a7/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
index 599654b..dfb15b0 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
+++ b/asterixdb/asterix-lang-sqlpp/src/main/java/org/apache/asterix/lang/sqlpp/visitor/base/AbstractSqlppExpressionScopingVisitor.java
@@ -274,7 +274,7 @@ public class AbstractSqlppExpressionScopingVisitor extends AbstractSqlppSimpleEx
         // variables defined in the parent scope.
         Scope scope = new Scope(scopeChecker, scopeChecker.getCurrentScope(), true);
         scopeChecker.pushExistingScope(scope);
-        independentSubquery.getExpr().accept(this, arg);
+        independentSubquery.setExpr(independentSubquery.getExpr().accept(this, arg));
         scopeChecker.removeCurrentScope();
         return independentSubquery;
     }


Mime
View raw message