Closed GoogleCodeExporter closed 9 years ago
A count operation on large set returns an exception (ArrayIndexOutOfBoundsException). This issue is only reproduced on the 10k dataset rows which I uploaded on: http://kereno.com/part-00000 Reproduction: ============== The query below returns a null[] in the result page (see stack trace and opt. plan below). Note that the query works only if you count the afternoons (smaller set). use dataverse kereno; for $page_views in dataset page_views group by $group_key := $page_views.user with $page_views let $morning := for $m in $page_views where ($m.timestamp<43200) return $m let $afternoon := for $a in $page_views where ($a.timestamp>=43200) return $a return { "m": count ($morning), "a":$afternoon } Stack: Apr 07, 2014 2:29:01 PM edu.uci.ics.hyracks.control.common.work.WorkQueue$WorkerThread run INFO: Executing: edu.uci.ics.hyracks.control.cc.work.JobletCleanupNotificationWork@1fda0329 edu.uci.ics.hyracks.api.exceptions.HyracksException: Job failed on account of: edu.uci.ics.hyracks.api.exceptions.HyracksDataException: java.lang.ArrayIndexOutOfBoundsException at edu.uci.ics.hyracks.control.cc.job.JobRun.waitForCompletion(JobRun.java:207) at edu.uci.ics.hyracks.control.cc.work.WaitForJobCompletionWork$1.run(WaitForJobCompletionWork.java:44) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: edu.uci.ics.hyracks.api.exceptions.HyracksDataException: edu.uci.ics.hyracks.api.exceptions.HyracksDataException: java.lang.ArrayIndexOutOfBoundsException at edu.uci.ics.hyracks.control.common.utils.ExceptionUtils.setNodeIds(ExceptionUtils.java:41) at edu.uci.ics.hyracks.control.nc.Task.run(Task.java:291) ... 3 more Caused by: edu.uci.ics.hyracks.api.exceptions.HyracksDataException: java.lang.ArrayIndexOutOfBoundsException at edu.uci.ics.hyracks.dataflow.std.sort.ExternalSortRunMerger.process(ExternalSortRunMerger.java:162) at edu.uci.ics.hyracks.dataflow.std.sort.ExternalSortOperatorDescriptor$MergeActivity$1.initialize(ExternalSortOperatorDescriptor.java:189) at edu.uci.ics.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.initialize(SuperActivityOperatorNodePushable.java:81) at edu.uci.ics.hyracks.control.nc.Task.run(Task.java:234) ... 3 more Caused by: java.lang.ArrayIndexOutOfBoundsException Apr 07, 2014 2:29:01 PM edu.uci.ics.asterix.api.http.servlet.APIServlet doPost SEVERE: Job failed on account of: edu.uci.ics.hyracks.api.exceptions.HyracksDataException: java.lang.ArrayIndexOutOfBoundsException edu.uci.ics.hyracks.api.exceptions.HyracksException: Job failed on account of: edu.uci.ics.hyracks.api.exceptions.HyracksDataException: java.lang.ArrayIndexOutOfBoundsException at edu.uci.ics.hyracks.control.cc.job.JobRun.waitForCompletion(JobRun.java:207) at edu.uci.ics.hyracks.control.cc.work.WaitForJobCompletionWork$1.run(WaitForJobCompletionWork.java:44) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: edu.uci.ics.hyracks.api.exceptions.HyracksDataException: edu.uci.ics.hyracks.api.exceptions.HyracksDataException: java.lang.ArrayIndexOutOfBoundsException at edu.uci.ics.hyracks.control.common.utils.ExceptionUtils.setNodeIds(ExceptionUtils.java:41) at edu.uci.ics.hyracks.control.nc.Task.run(Task.java:291) ... 3 more Caused by: edu.uci.ics.hyracks.api.exceptions.HyracksDataException: java.lang.ArrayIndexOutOfBoundsException at edu.uci.ics.hyracks.dataflow.std.sort.ExternalSortRunMerger.process(ExternalSortRunMerger.java:162) at edu.uci.ics.hyracks.dataflow.std.sort.ExternalSortOperatorDescriptor$MergeActivity$1.initialize(ExternalSortOperatorDescriptor.java:189) at edu.uci.ics.hyracks.api.rewriter.runtime.SuperActivityOperatorNodePushable.initialize(SuperActivityOperatorNodePushable.java:81) at edu.uci.ics.hyracks.control.nc.Task.run(Task.java:234) ... 3 more Caused by: java.lang.ArrayIndexOutOfBoundsException Optimized plan: distribute result [%0->$$16] -- DISTRIBUTE_RESULT |PARTITIONED| exchange -- ONE_TO_ONE_EXCHANGE |PARTITIONED| project ([$$16]) -- STREAM_PROJECT |PARTITIONED| assign [$$16] <- [function-call: asterix:closed-record-constructor, Args:[AString: {m}, function-call: asterix:count, Args:[%0->$$12], AString: {a}, function-call: asterix:count, Args:[%0->$$15]]] -- ASSIGN |PARTITIONED| project ([$$12, $$15]) -- STREAM_PROJECT |PARTITIONED| subplan { aggregate [$$15] <- [function-call: asterix:listify, Args:[%0->$$5]] -- AGGREGATE |LOCAL| select (function-call: algebricks:ge, Args:[%0->$$22, AInt32: {43200}]) -- STREAM_SELECT |LOCAL| assign [$$22] <- [function-call: asterix:field-access-by-index, Args:[%0->$$5, AInt32: {6}]] -- ASSIGN |LOCAL| unnest $$5 <- function-call: asterix:scan-collection, Args:[%0->$$9] -- UNNEST |LOCAL| nested tuple source -- NESTED_TUPLE_SOURCE |LOCAL| } -- SUBPLAN |PARTITIONED| subplan { aggregate [$$12] <- [function-call: asterix:listify, Args:[%0->$$3]] -- AGGREGATE |LOCAL| select (function-call: algebricks:lt, Args:[%0->$$21, AInt32: {43200}]) -- STREAM_SELECT |LOCAL| assign [$$21] <- [function-call: asterix:field-access-by-index, Args:[%0->$$3, AInt32: {6}]] -- ASSIGN |LOCAL| unnest $$3 <- function-call: asterix:scan-collection, Args:[%0->$$9] -- UNNEST |LOCAL| nested tuple source -- NESTED_TUPLE_SOURCE |LOCAL| } -- SUBPLAN |PARTITIONED| project ([$$9]) -- STREAM_PROJECT |PARTITIONED| exchange -- ONE_TO_ONE_EXCHANGE |PARTITIONED| group by ([$$1 := %0->$$19]) decor ([]) { aggregate [$$9] <- [function-call: asterix:listify, Args:[%0->$$2]] -- AGGREGATE |LOCAL| nested tuple source -- NESTED_TUPLE_SOURCE |LOCAL| } -- PRE_CLUSTERED_GROUP_BY[$$19] |PARTITIONED| exchange -- ONE_TO_ONE_EXCHANGE |PARTITIONED| order (ASC, %0->$$19) -- STABLE_SORT [$$19(ASC)] |PARTITIONED| exchange -- HASH_PARTITION_EXCHANGE [$$19] |PARTITIONED| assign [$$19] <- [function-call: asterix:field-access-by-index, Args:[%0->$$2, AInt32: {1}]] -- ASSIGN |PARTITIONED| project ([$$2]) -- STREAM_PROJECT |PARTITIONED| exchange -- ONE_TO_ONE_EXCHANGE |PARTITIONED| data-scan []<-[$$20, $$2] <- kereno:page_views -- DATASOURCE_SCAN |PARTITIONED| exchange -- ONE_TO_ONE_EXCHANGE |PARTITIONED| empty-tuple-source -- EMPTY_TUPLE_SOURCE |PARTITIONED|
Original issue reported on code.google.com by ker...@gmail.com on 8 Apr 2014 at 12:16
ker...@gmail.com
Original comment by buyingyi@gmail.com on 18 Nov 2014 at 8:00
buyingyi@gmail.com
Original issue reported on code.google.com by
ker...@gmail.com
on 8 Apr 2014 at 12:16