[SPARK-57828][SQL] Add vectorized Parquet reader support for nanosecond-precision timestamps#56942
Open
yadavay-amzn wants to merge 1 commit into
Open
[SPARK-57828][SQL] Add vectorized Parquet reader support for nanosecond-precision timestamps#56942yadavay-amzn wants to merge 1 commit into
yadavay-amzn wants to merge 1 commit into
Conversation
…nd-precision timestamps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Adds vectorized Parquet reader support for nanosecond-precision timestamp columns (INT64
TIMESTAMP(NANOS)). A newTimestampNanosUpdaterinParquetVectorUpdaterFactorydecomposes epoch-nanoseconds into the two-child column-vector representation (epochMicros: Long,nanosWithinMicro: Short), matchingDateTimeUtils.epochNanosToTimestampNanosand the existing row-basedParquetRowConverterexactly (including the dictionary-decoding path). Previously these columns forced the row-based reader (isBatchReadSupported=false, otherwiseSchemaColumnConvertNotSupportedException).Why are the changes needed?
Part of nanosecond-precision timestamp support (SPARK-56822). The vectorized reader is the default fast path; nanosecond-precision timestamp columns should be readable through it - producing identical results to the row-based reader - rather than falling back to row-by-row reads.
Does this PR introduce any user-facing change?
Yes - nanosecond-precision timestamp columns in Parquet are now read via the vectorized reader (a performance improvement); results are identical to the row-based reader.
How was this patch tested?
ParquetTimestampNanosSuitewas upgraded to run under both readers (withAllParquetReaders), plus a new vectorized-vs-row-based parity test over edge-case nanosecond values (positive, pre-epoch, exact-second, nulls) at precisions 7/8/9 for both NTZ and LTZ, and a rebase-mode-invariance test. All 11 tests pass;ParquetIOSuitenanosecond tests pass; scalastyle + checkstyle clean.Was this patch authored or co-authored using generative AI tooling?
Authored with assistance by Claude Opus 4.8.