Steven Jacobs created ASTERIXDB-2101: ----------------------------------------
Summary: Record Merge Error when compiling job Key: ASTERIXDB-2101 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2101 Project: Apache AsterixDB Issue Type: Bug Reporter: Steven Jacobs The following will throw a runtime exception: 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) }; 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, Metadata.Datatype b, channels.RoomOccupants(sub.param0) result where b.DatatypeName = sub.BrokerName and b.DataverseName = sub.DataverseName ) returning a; Here is the stack trace: WARNING: Unhandled throwable java.lang.VerifyError: Bad return type Exception Details: Location: org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor$_EvaluatorFactoryGen.access$0(Lorg/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor$_EvaluatorFactoryGen;)Lorg/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor; @4: areturn Reason: Type 'org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor$_Gen' (current frame, stack[0]) is not assignable to 'org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor' (from method signature) Current Frame: bci: @4 flags: { } locals: { 'org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor$_EvaluatorFactoryGen' } stack: { 'org/apache/asterix/runtime/evaluators/functions/records/RecordMergeDescriptor$_Gen' } Bytecode: 0x0000000: 2ab4 0063 b0 at org.apache.asterix.runtime.evaluators.functions.records.RecordMergeDescriptor$_Gen.createEvaluatorFactory(RecordMergeDescriptor.java:86) at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.createScalarFunctionEvaluatorFactory(QueryLogicalExpressionJobGen.java:144) at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.createEvaluatorFactory(QueryLogicalExpressionJobGen.java:109) at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.codegenArguments(QueryLogicalExpressionJobGen.java:161) at org.apache.asterix.jobgen.QueryLogicalExpressionJobGen.createScalarFunctionEvaluatorFactory(QueryLogicalExpressionJobGen.java:134) 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.hyracks.algebricks.core.algebra.operators.physical.AssignPOperator.contributeRuntimeOperator(AssignPOperator.java:84) at org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator.contributeRuntimeOperator(AbstractLogicalOperator.java:166) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:84) at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlan(PlanCompiler.java:60) at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.createJob(HeuristicCompilerFactoryBuilder.java:107) at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:333) 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)