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] [Closed] (ASTERIXDB-1515) NPE running SQL++ query with undefined variable
Date Wed, 06 Jul 2016 05:02:11 GMT

     [ https://issues.apache.org/jira/browse/ASTERIXDB-1515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Till Westmann closed ASTERIXDB-1515.
------------------------------------

> 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: Till Westmann
>
> 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