Github user nongli commented on a diff in the pull request:
https://github.com/apache/spark/pull/10908#discussion_r51462376
--- Diff:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedPlainValuesReader.java
---
@@ -52,15 +55,49 @@ public void skip(int n) {
}
@Override
- public void readIntegers(int total, ColumnVector c, int rowId) {
+ public final void readIntegers(int total, ColumnVector c, int rowId) {
c.putIntsLittleEndian(rowId, total, buffer, offset -
Platform.BYTE_ARRAY_OFFSET);
offset += 4 * total;
}
@Override
- public int readInteger() {
+ public final void readLongs(int total, ColumnVector c, int rowId) {
+ c.putLongsLittleEndian(rowId, total, buffer, offset -
Platform.BYTE_ARRAY_OFFSET);
+ offset += 8 * total;
+ }
+
+ @Override
+ public final void readBytes(int total, ColumnVector c, int rowId) {
+ c.putBytes(rowId, total, buffer, offset - Platform.BYTE_ARRAY_OFFSET);
+ offset += total;
+ }
+
+ @Override
+ public final int readInteger() {
int v = Platform.getInt(buffer, offset);
offset += 4;
return v;
}
+
+ @Override
+ public final long readLong() {
+ long v = Platform.getLong(buffer, offset);
+ offset += 8;
+ return v;
+ }
+
+ @Override
+ public final byte readByte() {
+ return (byte)readInteger();
--- End diff --
4. Parquet only has 2 integers physical types: int32 and int64 and relies
on encodings to compress bytes/shorts.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]