Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19769#discussion_r155552953
--- Diff:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedColumnReader.java
---
@@ -294,11 +304,22 @@ private void decodeDictionaryIds(
break;
case INT96:
if (column.dataType() == DataTypes.TimestampType) {
- for (int i = rowId; i < rowId + num; ++i) {
- // TODO: Convert dictionary of Binaries to dictionary of Longs
- if (!column.isNullAt(i)) {
- Binary v =
dictionary.decodeToBinary(dictionaryIds.getDictId(i));
- column.putLong(i,
ParquetRowConverter.binaryToSQLTimestamp(v));
+ if (!shouldConvertTimestamps()) {
+ for (int i = rowId; i < rowId + num; ++i) {
+ if (!column.isNullAt(i)) {
+ Binary v =
dictionary.decodeToBinary(dictionaryIds.getDictId(i));
+ column.putLong(i,
ParquetRowConverter.binaryToSQLTimestamp(v));
+ }
+ }
+ } else {
+ for (int i = rowId; i < rowId + num; ++i) {
+ // TODO: Convert dictionary of Binaries to dictionary of
Longs
--- End diff --
I think this comment belongs to
https://github.com/apache/spark/pull/19769/files#diff-7bdf5fd0ce0b1ccbf4ecf083611976e6R308
?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]