Skip to content

[SPARK-58414][SQL][TESTS] Add e2e coverage for nanosecond timestamps nested in complex types in the Arrow cache - #57619

Open
viirya wants to merge 1 commit into
apache:masterfrom
viirya:arrow-cache-nested-nanos-test
Open

[SPARK-58414][SQL][TESTS] Add e2e coverage for nanosecond timestamps nested in complex types in the Arrow cache#57619
viirya wants to merge 1 commit into
apache:masterfrom
viirya:arrow-cache-nested-nanos-test

Conversation

@viirya

@viirya viirya commented Jul 29, 2026

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Add a test to ArrowCachedBatchSerializerSuite that round-trips nanosecond timestamps nested inside an array, a struct field, and a map value through the Arrow cache, using a value outside the int64 epoch-nanos window (year 3000 at nanosecond precision) that the standard interchange encoding cannot represent, alongside an in-window value.

Why are the changes needed?

The suite covers top-level nanosecond timestamps and nested CalendarInterval, but had no round trip for nanosecond timestamps nested in complex types. The nested path relies on recursion in two places: ArrowWriter's field writers dispatch on (type, vector) recursively on the write side, and on the read side every container accessor in ArrowColumnVector (struct children, ArrayAccessor's data vector, MapAccessor's keys/values) wraps its element vector through the constructor that runs the lossless tagged-struct recognizers. A regression at any nesting level would silently decode wrong values, so the machinery deserves an end-to-end pin for the one lossless type family that has out-of-window domain values.

Does this PR introduce any user-facing change?

No, test-only.

How was this patch tested?

The new test; full ArrowCachedBatchSerializerSuite and ArrowCachedBatchKryoRegistrationSuite pass (76 tests).

Was this patch authored or co-authored using generative AI tooling?

Yes, this pull request and its description were written by Claude Code.

…nested in complex types in the Arrow cache

The Arrow cache suite covers top-level nanosecond timestamps and nested
CalendarInterval, but had no round trip for nanosecond timestamps nested
in complex types. The nested read path relies on every container accessor
in ArrowColumnVector wrapping its element vector through the constructor
that runs the tagged-struct recognizers, and the write path on
ArrowWriter's recursive field-writer dispatch -- pin that machinery with
array, struct, and map-value round trips, using a value outside the int64
epoch-nanos window that the standard interchange encoding cannot
represent.

Co-authored-by: Claude Code
@uros-b

uros-b commented Jul 29, 2026

Copy link
Copy Markdown
Member

Thank you @viirya!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants