Repository navigation
fix(parquet): import a nullable TIMESTAMP column with nulls - #630
Merged
Merged
Conversation
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>
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.
Closes #627.
ParquetImporterbuffered every timestamp column in a primitivelong[], so a null in an OPTIONALTIMESTAMPthrew an NPE, reported as "declared REQUIRED". A nullable timestamp column now buffers in aLong[], and a chunk with nulls goes to the writer asNullableData.That exposed a writer bug:
Repartitioner, coalescing aDateTimePartsDatapiece with aNullableDataone, wrapped the parts carrier insideNullableData, a shape no encoder accepts. A validity now always wraps the plain storage.Tests
ParquetExporterTest#nullableTimestampColumn_withNulls_roundTripThroughParquetAndBack(export → import → read)RepartitionerTest#dateTimePartsBatchMixedWithNullableBatch_coalescesToNullablePlainStorageParquetImportInteropIntegrationTest: vortex-jni reads the imported file (full, filtered, row-range); fails without each of the two fixes.Real data (Raincloud):
bi-telcoandbi-trainsuk2now import; their CSV exports are byte-identical to the vortex-jni-written files'.🤖 Generated with Claude Code