You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DeltaByteArrayReader fails with ArrayIndexOutOfBoundsException when moving across pages #1781
DeltaByteArrayReader.readBytes() fails with ArrayIndexOutOfBoundsException soon after it has processed a new page via initFromPage(). This issue can be reproduced by trying to read a Binary column that is encoded using delta byte array and spans multiple pages.
This is happening because ColumnReaderImpl.initDataReader() creates a new ValueReader every time a new page is processed (see this.dataColumn = dataEncoding.getValuesReader(path, VALUES)). The DeltaByteArrayReader is stateful and needs to remember the previous Binary value that was read across pages. When a new DeltaByteArrayReader is created, this information is lost.
Exception in thread "main" parquet.io.ParquetDecodingException: Can not read value at 94400 in block 0 in file file:/home/abennett/parquet/bug/sample.par
at parquet.hadoop.InternalParquetRecordReader.nextKeyValue(InternalParquetRecordReader.java:228)
at parquet.hadoop.ParquetReader.read(ParquetReader.java:129)
at in.alosh.garage.parquet.SimplestParquetRead$.main(SimplestParquetRead.scala:26)
at in.alosh.garage.parquet.SimplestParquetRead.main(SimplestParquetRead.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: parquet.io.ParquetDecodingException: Can't read value in column [message] BINARY at value 94401 out of 100000, 1 out of 5600 in currentPage. repetition level: 0, definition level: 0
at parquet.column.impl.ColumnReaderImpl.readValue(ColumnReaderImpl.java:464)
at parquet.column.impl.ColumnReaderImpl.writeCurrentValueToConverter(ColumnReaderImpl.java:365)
at parquet.io.RecordReaderImplementation.read(RecordReaderImplementation.java:418)
at parquet.hadoop.InternalParquetRecordReader.nextKeyValue(InternalParquetRecordReader.java:209)
... 8 more
Caused by: java.lang.ArrayIndexOutOfBoundsException
at parquet.column.values.deltastrings.DeltaByteArrayReader.readBytes(DeltaByteArrayReader.java:70)
at parquet.column.impl.ColumnReaderImpl$2$6.read(ColumnReaderImpl.java:308)
at parquet.column.impl.ColumnReaderImpl.readValue(ColumnReaderImpl.java:459)
... 11 more
Alosh Bennett:
Code to reproduce the bug. This will create a Parquet file that should contain a UTF-8 column split across multiple pages. The bug can be reproduced by reading this file from a sample program or via spark-shell.
Activity
asfimport commentedon Apr 7, 2015
Alosh Bennett:
Stacktrace:
asfimport commentedon Apr 7, 2015
Alosh Bennett:
Code to reproduce the bug. This will create a Parquet file that should contain a UTF-8 column split across multiple pages. The bug can be reproduced by reading this file from a sample program or via spark-shell.