LuciferYang opened a new pull request, #55971: URL: https://github.com/apache/spark/pull/55971
### What changes were proposed in this pull request? Extend the bulk read+convert pattern introduced in SPARK-56791 to `DateToTimestampNTZUpdater` (parquet INT32 DATE read into a Spark `TimestampNTZType` at UTC, CORRECTED rebase mode). A new `readIntegersAsTimestampMicros` default method on `VectorizedValuesReader` does the per-row fallback. `VectorizedPlainValuesReader` overrides it to fetch source bytes once via `getBuffer(total * 4)` and run a tight in-method conversion loop. `DateToTimestampNTZUpdater.readValues` becomes a one-line delegation. The per-element conversion is `DateTimeUtils.daysToMicros(days, ZoneOffset.UTC)`, matching the per-row Updater's exact semantics including the `Math.multiplyExact` overflow check. The `LEGACY` / `EXCEPTION` rebase variants (handled by `DateToTimestampNTZWithRebaseUpdater`) are out of scope. Unlike the pure-primitive-cast siblings (SPARK-56791/56801/56802), the per-element conversion here is a function call rather than a JVM-native widen, so the expected speedup is smaller; the win still comes from collapsing N `getBuffer(4)` allocations into one. ### Why are the changes needed? `DateToTimestampNTZUpdater.readValues` allocates a fresh `ByteBuffer` slice inside `getBuffer(4)` for every element on the legacy path. Collapsing N allocations into one is the same win SPARK-56791 delivered for the INT32 -> Long sibling. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? (To be updated after the GHA benchmark and test runs complete.) ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code -- 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]
