attilapiros commented on a change in pull request #23721:
[SPARK-26797][SQL][WIP] Start using the new logical types API of Parquet 1.11.0
instead of the deprecated one
URL: https://github.com/apache/spark/pull/23721#discussion_r253007129
##########
File path:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedColumnReader.java
##########
@@ -425,13 +438,31 @@ private void readLongBatch(int rowId, int num,
WritableColumnVector column) thro
// This is where we implement support for the valid type conversions.
if (column.dataType() == DataTypes.LongType ||
DecimalType.is64BitDecimalType(column.dataType()) ||
- originalType == OriginalType.TIMESTAMP_MICROS) {
- defColumn.readLongs(
- num, column, rowId, maxDefLevel, (VectorizedValuesReader) dataColumn);
- } else if (originalType == OriginalType.TIMESTAMP_MILLIS) {
+ isTimestampWithUnit(logicalTypeAnnotation, MICROS)) {
+ if (needsTimezoneAdjustment()) {
+ for (int i = 0; i < num; i++) {
+ if (defColumn.readInteger() == maxDefLevel) {
+ long timestamp = dataColumn.readLong();
+ if (needsTimezoneAdjustment()) {
Review comment:
Unnecessary if condition as`needsTimezoneAdjustment()` will be always true
because in line 442 it is already tested.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]