HyukjinKwon commented on a change in pull request #27973:
[SPARK-31159][SQL][FOLLOWUP] Move checking of the `rebaseDateTime` flag out of
the loop in `VectorizedColumnReader`
URL: https://github.com/apache/spark/pull/27973#discussion_r396473005
##########
File path:
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/VectorizedColumnReader.java
##########
@@ -462,15 +462,22 @@ private void readLongBatch(int rowId, int num,
WritableColumnVector column) thro
num, column, rowId, maxDefLevel, (VectorizedValuesReader)
dataColumn);
}
} else if (originalType == OriginalType.TIMESTAMP_MILLIS) {
- for (int i = 0; i < num; i++) {
- if (defColumn.readInteger() == maxDefLevel) {
- long micros = DateTimeUtils.millisToMicros(dataColumn.readLong());
- if (rebaseDateTime) {
- micros = DateTimeUtils.rebaseJulianToGregorianMicros(micros);
+ if (rebaseDateTime) {
Review comment:
I am kind of neutral but a bit of dups vs a bit of perf :-). I guess it's
fine.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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]