Skip to content

fix(parquet): import a nullable TIMESTAMP column with nulls - #630

Merged
dfa1 merged 1 commit into
mainfrom
fix/627-parquet-nullable-timestamp
Nov 1, 2026
Merged

dfa1 merged 1 commit into
mainfrom
fix/627-parquet-nullable-timestamp

Conversation

@dfa1

@dfa1 dfa1 commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Closes #627.

ParquetImporter buffered every timestamp column in a primitive long[], so a null in an OPTIONAL TIMESTAMP threw an NPE, reported as "declared REQUIRED". A nullable timestamp column now buffers in a Long[], and a chunk with nulls goes to the writer as NullableData.

That exposed a writer bug: Repartitioner, coalescing a DateTimePartsData piece with a NullableData one, wrapped the parts carrier inside NullableData, a shape no encoder accepts. A validity now always wraps the plain storage.

Tests

  • ParquetExporterTest#nullableTimestampColumn_withNulls_roundTripThroughParquetAndBack (export → import → read)
  • RepartitionerTest#dateTimePartsBatchMixedWithNullableBatch_coalescesToNullablePlainStorage
  • ParquetImportInteropIntegrationTest: vortex-jni reads the imported file (full, filtered, row-range); fails without each of the two fixes.

Real data (Raincloud): bi-telco and bi-trainsuk2 now import; their CSV exports are byte-identical to the vortex-jni-written files'.

🤖 Generated with Claude Code

ParquetImporter buffered every timestamp column in a primitive long[], so a
null cell in an OPTIONAL TIMESTAMP threw a NullPointerException, reported as
"declared REQUIRED". A nullable timestamp column now buffers in a Long[] and
a chunk with nulls goes to the writer as NullableData.

That exposed a writer bug: Repartitioner, coalescing a DateTimePartsData
piece with a NullableData one, wrapped the parts carrier inside NullableData,
a shape no encoder accepts. A validity now always wraps the plain storage.

Found by the Raincloud corpus: bi-telco and bi-trainsuk2 now import, and
their CSV exports are byte-identical to the vortex-jni-written files'.

Closes #627

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dfa1
dfa1 merged commit 235e9f0 into main Nov 1, 2026
7 checks passed
@dfa1
dfa1 deleted the fix/627-parquet-nullable-timestamp branch November 1, 2026 18:29
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.

ParquetImporter: a nullable TIMESTAMP column with nulls fails as "declared REQUIRED"

1 participant