You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Steven Jacobs (JIRA)" <ji...@apache.org> on 2017/09/13 21:59:00 UTC
[jira] [Created] (ASTERIXDB-2089) Bad return type error for valid
SQL++ query
Steven Jacobs created ASTERIXDB-2089:
----------------------------------------
Summary: Bad return type error for valid SQL++ query
Key: ASTERIXDB-2089
URL: https://issues.apache.org/jira/browse/ASTERIXDB-2089
Project: Apache AsterixDB
Issue Type: Bug
Reporter: Steven Jacobs
The following will produce a "Bad return type" error:
drop dataverse channels if exists;
create dataverse channels;
use channels;
create type userLocation as {
userId: int,
roomNumber: int
};
create type result as {
id:uuid
};
create type subscriptionType as {
subscriptionId:uuid,
param0:int
};
create dataset roomRecordsResults(result)
primary key id autogenerated;
create dataset roomRecordsSubscriptions(subscriptionType)
primary key subscriptionId autogenerated;
create dataset UserLocations(userLocation)
primary key userId;
create function RoomOccupants(room) {
(select location.userId
from UserLocations location
where location.roomNumber = room)
};
use channels;
SET inline_with "false";
insert into channels.roomRecordsResults as a (
with channelExecutionTime as current_datetime()
select result, channelExecutionTime, sub.subscriptionId as subscriptionId,current_datetime() as deliveryTime
from channels.roomRecordsSubscriptions sub,
channels.RoomOccupants(sub.param0) result
) returning a;
Here is the top of the stack trace:
WARNING: Unhandled throwable
java.lang.VerifyError: Bad return type
Exception Details:
Location:
org/apache/asterix/runtime/evaluators/functions/NotDescriptor$_EvaluatorFactoryGen.access$0(Lorg/apache/asterix/runtime/evaluators/functions/NotDescriptor$_EvaluatorFactoryGen;)Lorg/apache/asterix/runtime/evaluators/functions/NotDescriptor; @4: areturn
Reason:
Type 'org/apache/asterix/runtime/evaluators/functions/NotDescriptor$_Gen' (current frame, stack[0]) is not assignable to 'org/apache/asterix/runtime/evaluators/functions/NotDescriptor' (from method signature)
Current Frame:
bci: @4
flags: { }
locals: { 'org/apache/asterix/runtime/evaluators/functions/NotDescriptor$_EvaluatorFactoryGen' }
stack: { 'org/apache/asterix/runtime/evaluators/functions/NotDescriptor$_Gen' }
Bytecode:
0x0000000: 2ab4 003a b0
at org.apache.asterix.runtime.evaluators.functions.NotDescriptor$_Gen.createEvaluatorFactory(NotDescriptor.java:60)
at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.createScalarFunctionEvaluatorFactory(QueryLogicalExpressionJobGen.java:144)
at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.createEvaluatorFactory(QueryLogicalExpressionJobGen.java:109)
at org.apache.hyracks.algebricks.core.algebra.expressions.ExpressionRuntimeProvider.createEvaluatorFactory(ExpressionRuntimeProvider.java:41)
at org.apache.asterix.optimizer.rules.ConstantFoldingRule$ConstantFoldingVisitor.visitScalarFunctionCallExpression(ConstantFoldingRule.java:217)
at org.apache.asterix.optimizer.rules.ConstantFoldingRule$ConstantFoldingVisitor.visitScalarFunctionCallExpression(ConstantFoldingRule.java:1)
at org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
at org.apache.asterix.optimizer.rules.ConstantFoldingRule$ConstantFoldingVisitor.transform(ConstantFoldingRule.java:163)
at org.apache.hyracks.algebricks.core.algebra.operators.logical.SelectOperator.acceptExpressionTransform(SelectOperator.java:83)
at org.apache.asterix.optimizer.rules.ConstantFoldingRule.rewritePost(ConstantFoldingRule.java:150)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:126)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialFixpointRuleController.rewriteWithRuleCollection(SequentialFixpointRuleController.java:53)
at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runOptimizationSets(HeuristicOptimizer.java:102)
at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:82)
at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.optimize(HeuristicCompilerFactoryBuilder.java:90)
at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:267)
at org.apache.asterix.app.translator.QueryTranslator.rewriteCompileInsertUpsert(QueryTranslator.java:1867)
at org.apache.asterix.app.translator.QueryTranslator.lambda$0(QueryTranslator.java:1755)
at org.apache.asterix.app.translator.QueryTranslator.createAndRunJob(QueryTranslator.java:2412)
at org.apache.asterix.app.translator.QueryTranslator.deliverResult(QueryTranslator.java:2345)
at org.apache.asterix.app.translator.QueryTranslator.handleInsertUpsertStatement(QueryTranslator.java:1776)
at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:337)
at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:254)
at org.apache.asterix.api.http.server.ApiServlet.post(ApiServlet.java:157)
at org.apache.hyracks.http.server.AbstractServlet.handle(AbstractServlet.java:78)
at org.apache.hyracks.http.server.HttpRequestHandler.handle(HttpRequestHandler.java:70)
at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:55)
at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:36)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)