[ 
https://issues.apache.org/jira/browse/HIVE-10047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14372576#comment-14372576
 ] 

Matt McCline commented on HIVE-10047:
-------------------------------------

I can tell from the stack trace this is not the HIVE-9937 patch because it is 
using VectorColumnAssignFactory (unless the stack trace from using wrong 
binary).

Very strange problem.  The code is correct.  It is looping over columns and 
filling up the next row in the outputBatch by using  outputBatch.size as the 
index.

After the row is filled, it increments outputBatch.size and checks if the 
outputBatch is full.

So, what could be going wrong here?

Pure speculation:
1) Someone increased DEFAULT_SIZE to more than 1024, but 
VectorizedRowBatchCtx.createVectorizedRowBatch() is creating 1024 sized batches?
2) A VectorMapJoinOperator is being concurrently executed by 2 threads.  Ah, 
but we are single threaded.  Oh.




> LLAP: VectorMapJoinOperator gets an over-flow on batchSize of 1024
> ------------------------------------------------------------------
>
>                 Key: HIVE-10047
>                 URL: https://issues.apache.org/jira/browse/HIVE-10047
>             Project: Hive
>          Issue Type: Sub-task
>    Affects Versions: llap
>            Reporter: Gopal V
>            Assignee: Matt McCline
>             Fix For: llap
>
>
> Simple LLAP queries on constrained resources runs into an exception which 
> suggests that the 
> {code}
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 1024
>         at 
> org.apache.hadoop.hive.ql.exec.vector.VectorColumnAssignFactory$VectorLongColumnAssign.assignLong(VectorColumnAssignFactory.java:113)
>         at 
> org.apache.hadoop.hive.ql.exec.vector.VectorColumnAssignFactory$9.assignObjectValue(VectorColumnAssignFactory.java:293)
>         at 
> org.apache.hadoop.hive.ql.exec.vector.VectorMapJoinOperator.internalForward(VectorMapJoinOperator.java:196)
>         at 
> org.apache.hadoop.hive.ql.exec.CommonJoinOperator.genUniqueJoinObject(CommonJoinOperator.java:653)
>         at 
> org.apache.hadoop.hive.ql.exec.CommonJoinOperator.genUniqueJoinObject(CommonJoinOperator.java:656)
>         at 
> org.apache.hadoop.hive.ql.exec.CommonJoinOperator.checkAndGenObject(CommonJoinOperator.java:752)
>         at 
> org.apache.hadoop.hive.ql.exec.MapJoinOperator.processOp(MapJoinOperator.java:316)
>         ... 22 more
> {code}
> The relevant line is due to the check for a full output-batch being outside 
> of the loop here - looks like it can be triggered during MxN joins where 
> there are more values than there were input rows in the input batch.
> {code}
>     for (int i=0; i<values.length; ++i) {
>       vcas[i].assignObjectValue(values[i], outputBatch.size);
>     }
>    ++outputBatch.size;
>     if (outputBatch.size == VectorizedRowBatch.DEFAULT_SIZE) {
>       flushOutput();
>     }
> {code}



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

Reply via email to