You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2016/02/28 04:46:10 UTC

spark git commit: [SPARK-13533][SQL] Fix readBytes in VectorizedPlainValuesReader

Repository: spark
Updated Branches:
  refs/heads/master 3814d0bcf -> d780ed8b5


[SPARK-13533][SQL] Fix readBytes in VectorizedPlainValuesReader

## What changes were proposed in this pull request?

Fix readBytes in VectorizedPlainValuesReader. This fixes a copy and paste issue.

## How was this patch tested?

Ran ParquetHadoopFsRelationSuite which failed before this.

Author: Nong Li <no...@databricks.com>

Closes #11414 from nongli/spark-13533.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d780ed8b
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d780ed8b
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d780ed8b

Branch: refs/heads/master
Commit: d780ed8b5c9156ac8595ac5cbb77d83c65fad64c
Parents: 3814d0b
Author: Nong Li <no...@databricks.com>
Authored: Sat Feb 27 19:45:57 2016 -0800
Committer: Reynold Xin <rx...@databricks.com>
Committed: Sat Feb 27 19:45:57 2016 -0800

----------------------------------------------------------------------
 .../execution/datasources/parquet/VectorizedPlainValuesReader.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/d780ed8b/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedPlainValuesReader.java
----------------------------------------------------------------------
diff --git a/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedPlainValuesReader.java b/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedPlainValuesReader.java
index bf3283e..57cc28e 100644
--- a/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedPlainValuesReader.java
+++ b/sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedPlainValuesReader.java
@@ -85,7 +85,7 @@ public class VectorizedPlainValuesReader extends ValuesReader implements Vectori
     for (int i = 0; i < total; i++) {
       // Bytes are stored as a 4-byte little endian int. Just read the first byte.
       // TODO: consider pushing this in ColumnVector by adding a readBytes with a stride.
-      c.putInt(rowId + i, buffer[offset]);
+      c.putByte(rowId + i, buffer[offset]);
       offset += 4;
     }
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org