You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/01 10:47:36 UTC

[GitHub] 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

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:
users@infra.apache.org


With regards,
Apache Git Services

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