From 95ecde09392ab4f2aab2f1165fb180c5466c26b4 Mon Sep 17 00:00:00 2001 From: Ryan Blue Date: Tue, 8 May 2018 09:31:11 -0700 Subject: [PATCH] Fix buffer unpacking offset in VectorizedRleValuesReader. --- .../datasources/parquet/VectorizedRleValuesReader.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedRleValuesReader.java b/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedRleValuesReader.java index 26474b4c9a1b9..fe3d31ae8e746 100644 --- a/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedRleValuesReader.java +++ b/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedRleValuesReader.java @@ -629,8 +629,7 @@ private void readNextGroup() { while (valueIndex < this.currentCount) { // values are bit packed 8 at a time, so reading bitWidth will always work ByteBuffer buffer = in.slice(bitWidth); - this.packer.unpack8Values( - buffer, buffer.arrayOffset() + buffer.position(), this.currentBuffer, valueIndex); + this.packer.unpack8Values(buffer, buffer.position(), this.currentBuffer, valueIndex); valueIndex += 8; } return;