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

Till Westmann updated ASTERIXDB-1293:
-------------------------------------
    Assignee: Yingyi Bu

> Unable to insert elements of an Ordered list into an Unordered list
> -------------------------------------------------------------------
>
>                 Key: ASTERIXDB-1293
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1293
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: AsterixDB, Data Formats
>            Reporter: Pouria
>            Assignee: Yingyi Bu
>
> Data type mismatch makes it impossible to insert elements of an "ordered" 
> list into an "unordered" list.
> Here is an example to reproduce:
> {noformat}
> drop dataverse test if exists;
> create dataverse test;
> use dataverse test;
> create type typeA as {
> id: int64,
> val: {{ int64 }}
> }
> create dataset dsa(typeA) primary key id;
> insert into dataset dsa ( {"id": 1, "val": [10, 20]} );
> {noformat}
> Here is the error:
> {noformat}
> org.apache.hyracks.api.exceptions.HyracksDataException: 
> java.util.concurrent.ExecutionException: 
> org.apache.hyracks.api.exceptions.HyracksDataException: 
> org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: 
> org.apache.asterix.common.exceptions.AsterixException: 
> java.lang.IllegalStateException: type mismatch: missing a required closed 
> field val:typeA_val
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.runInParallel(SuperActivityOperatorNodePushable.java:215)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.initialize(SuperActivityOperatorNodePushable.java:83)
>       at org.apache.hyracks.control.nc.Task.run(Task.java:258)
>       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)
> Caused by: java.util.concurrent.ExecutionException: 
> org.apache.hyracks.api.exceptions.HyracksDataException: 
> org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: 
> org.apache.asterix.common.exceptions.AsterixException: 
> java.lang.IllegalStateException: type mismatch: missing a required closed 
> field val:typeA_val
>       at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>       at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.runInParallel(SuperActivityOperatorNodePushable.java:213)
>       ... 5 more
> Caused by: org.apache.hyracks.api.exceptions.HyracksDataException: 
> org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: 
> org.apache.asterix.common.exceptions.AsterixException: 
> java.lang.IllegalStateException: type mismatch: missing a required closed 
> field val:typeA_val
>       at 
> org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.produceTuple(AssignRuntimeFactory.java:159)
>       at 
> org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.nextFrame(AssignRuntimeFactory.java:140)
>       at 
> org.apache.hyracks.dataflow.common.comm.io.AbstractFrameAppender.flush(AbstractFrameAppender.java:83)
>       at 
> org.apache.hyracks.algebricks.runtime.operators.std.EmptyTupleSourceRuntimeFactory$1.open(EmptyTupleSourceRuntimeFactory.java:55)
>       at 
> org.apache.hyracks.algebricks.runtime.operators.meta.AlgebricksMetaOperatorDescriptor$1.initialize(AlgebricksMetaOperatorDescriptor.java:109)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.lambda$initialize$0(SuperActivityOperatorNodePushable.java:83)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable$1.call(SuperActivityOperatorNodePushable.java:204)
>       at 
> org.apache.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable$1.call(SuperActivityOperatorNodePushable.java:201)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       ... 3 more
> Caused by: 
> org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: 
> org.apache.asterix.common.exceptions.AsterixException: 
> java.lang.IllegalStateException: type mismatch: missing a required closed 
> field val:typeA_val
>       at 
> org.apache.asterix.runtime.evaluators.functions.CastRecordDescriptor$2$1.evaluate(CastRecordDescriptor.java:95)
>       at 
> org.apache.hyracks.algebricks.core.algebra.expressions.LogicalExpressionJobGenToExpressionRuntimeProviderAdapter$ScalarEvaluatorFactoryAdapter$1.evaluate(LogicalExpressionJobGenToExpressionRuntimeProviderAdapter.java:110)
>       at 
> org.apache.hyracks.algebricks.runtime.operators.std.AssignRuntimeFactory$1.produceTuple(AssignRuntimeFactory.java:157)
>       ... 11 more
> Caused by: org.apache.asterix.common.exceptions.AsterixException: 
> java.lang.IllegalStateException: type mismatch: missing a required closed 
> field val:typeA_val
>       at 
> org.apache.asterix.om.pointables.cast.ACastVisitor.visit(ACastVisitor.java:93)
>       at 
> org.apache.asterix.om.pointables.cast.ACastVisitor.visit(ACastVisitor.java:53)
>       at 
> org.apache.asterix.om.pointables.ARecordVisitablePointable.accept(ARecordVisitablePointable.java:288)
>       at 
> org.apache.asterix.runtime.evaluators.functions.CastRecordDescriptor$2$1.evaluate(CastRecordDescriptor.java:91)
>       ... 13 more
> Caused by: java.lang.IllegalStateException: type mismatch: missing a required 
> closed field val:typeA_val
>       at 
> org.apache.asterix.om.pointables.cast.ARecordCaster.matchClosedPart(ARecordCaster.java:277)
>       at 
> org.apache.asterix.om.pointables.cast.ARecordCaster.castRecord(ARecordCaster.java:136)
>       at 
> org.apache.asterix.om.pointables.cast.ACastVisitor.visit(ACastVisitor.java:91)
>       ... 16 more
> {noformat}



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

Reply via email to