You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Oleg Zinoviev (Jira)" <ji...@apache.org> on 2019/08/22 12:28:00 UTC

[jira] [Commented] (DRILL-7355) Reading a offset based vectors may produce IndexOutOfBoundsException

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

Oleg Zinoviev commented on DRILL-7355:
--------------------------------------

Any chance this can be fixed in 1.17.0?

> Reading a offset based vectors may produce IndexOutOfBoundsException
> --------------------------------------------------------------------
>
>                 Key: DRILL-7355
>                 URL: https://issues.apache.org/jira/browse/DRILL-7355
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.16.0
>         Environment: Stack trace:
> Caused by: java.lang.IndexOutOfBoundsException: index: 17, length: -799 (expected: range(0, 524288))
> 	at io.netty.buffer.AbstractByteBuf.checkIndex0(AbstractByteBuf.java:1125)
> 	at io.netty.buffer.AbstractByteBuf.checkIndex(AbstractByteBuf.java:1120)
> 	at io.netty.buffer.PooledUnsafeDirectByteBuf.nioBuffer(PooledUnsafeDirectByteBuf.java:244)
> 	at io.netty.buffer.WrappedByteBuf.nioBuffer(WrappedByteBuf.java:734)
> 	at io.netty.buffer.UnsafeDirectLittleEndian.nioBuffer(UnsafeDirectLittleEndian.java:34)
> 	at io.netty.buffer.DrillBuf.nioBuffer(DrillBuf.java:364)
> 	at org.apache.drill.exec.store.ParquetOutputRecordWriter$VarCharParquetConverter.writeField(ParquetOutputRecordWriter.java:1824)
> 	at org.apache.drill.exec.store.EventBasedRecordWriter.write(EventBasedRecordWriter.java:48)
> 	at org.apache.drill.exec.physical.impl.WriterRecordBatch.innerNext(WriterRecordBatch.java:111)
> 	at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:186)
> 	at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:104)
> 	at org.apache.drill.exec.physical.impl.SingleSenderCreator$SingleSenderRootExec.innerNext(SingleSenderCreator.java:93)
> 	at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:94)
> 	at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:296)
> 	at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:283)
>            Reporter: Oleg Zinoviev
>            Priority: Major
>
> Var16Char, VarBinary, VarChar and VarDecimal vectors contain a UInt4 offset vector. When reading values into the corresponding holder, the values of their offset vectors are written into the "start" and "end" fields as ordinary integers. In the subsequent operations is not considered that originally this values were unsigned integers and (for example in the calculation of the buffer size at ParquetOutputRecordWriter) usual subtraction "end" - "start" used. This causes the target buffer size to be negative. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)