asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Westmann (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ASTERIXDB-1515) NPE running SQL++ query with undefined variable
Date Tue, 05 Jul 2016 22:02:11 GMT
Till Westmann created ASTERIXDB-1515:
----------------------------------------

             Summary: NPE running SQL++ query with undefined variable
                 Key: ASTERIXDB-1515
                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1515
             Project: Apache AsterixDB
          Issue Type: Bug
          Components: Optimizer
            Reporter: Till Westmann
            Assignee: Yingyi Bu


The query
{noformat}
declare function abc(y) {
 3
};

let z =y
select element z;
{noformat}
(a fixed version of 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp)
fails with an NPE:
{noformat}
java.lang.NullPointerException
	at org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression.toString(VariableReferenceExpression.java:68)
	at org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalExpressionPrettyPrintVisitor.visitVariableReferenceExpression(LogicalExpressionPrettyPrintVisitor.java:43)
	at org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalExpressionPrettyPrintVisitor.visitVariableReferenceExpression(LogicalExpressionPrettyPrintVisitor.java:31)
	at org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression.accept(VariableReferenceExpression.java:102)
	at org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor.pprintExprList(LogicalOperatorPrettyPrintVisitor.java:494)
	at org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor.visitAssignOperator(LogicalOperatorPrettyPrintVisitor.java:184)
	at org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor.visitAssignOperator(LogicalOperatorPrettyPrintVisitor.java:70)
	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.accept(AssignOperator.java:63)
	at org.apache.hyracks.algebricks.core.algebra.prettyprint.PlanPrettyPrinter.printOperator(PlanPrettyPrinter.java:46)
	at org.apache.hyracks.algebricks.core.algebra.prettyprint.PlanPrettyPrinter.printOperator(PlanPrettyPrinter.java:58)
	at org.apache.hyracks.algebricks.core.algebra.prettyprint.PlanPrettyPrinter.printOperator(PlanPrettyPrinter.java:58)
	at org.apache.hyracks.algebricks.core.algebra.prettyprint.PlanPrettyPrinter.printPlan(PlanPrettyPrinter.java:34)
	at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:224)
	at org.apache.asterix.aql.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1965)
	at org.apache.asterix.aql.translator.QueryTranslator.handleQuery(QueryTranslator.java:2541)
	at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:389)
	at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:253)
	at org.apache.asterix.api.http.servlet.APIServlet.doPost(APIServlet.java:148)
{noformat}





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message