iemejia commented on code in PR #55923:
URL: https://github.com/apache/spark/pull/55923#discussion_r3403534666
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetVectorUpdaterBenchmark.scala:
##########
@@ -264,6 +264,10 @@ object ParquetVectorUpdaterBenchmark extends BenchmarkBase
{
TimestampNTZType,
descriptor(PrimitiveTypeName.INT32, LogicalTypeAnnotation.dateType()),
longVec, intBytes)
+ addReadValuesCase(benchmark, "LongAsNanosUpdater (TimeType)",
+ TimeType(),
+ descriptor(PrimitiveTypeName.INT64,
LogicalTypeAnnotation.timeType(false, LogicalTypeAnnotation.TimeUnit.MICROS)),
Review Comment:
Fixed, thanks for catching that.
##########
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/ParquetVectorUpdaterFactory.java:
##########
@@ -470,8 +470,10 @@ public void readValues(
int offset,
WritableColumnVector values,
VectorizedValuesReader valuesReader) {
- for (int i = 0; i < total; ++i) {
- readValue(offset + i, values, valuesReader);
+ valuesReader.readIntegersAsLongs(total, values, offset);
Review Comment:
Good idea -- done in this PR. Migrated `DateToTimestampNTZUpdater` to the
same two-pass pattern (`readIntegersAsLongs` + in-place `daysToMicros`) and
removed `readIntegersAsTimestampMicros` from `VectorizedValuesReader` and
`VectorizedPlainValuesReader`. The two-pass form is indeed the stronger pattern
since it uses the mandatory `readIntegersAsLongs` that every encoding already
implements.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]