Repository navigation
Conversation
gitedmond
requested review from
AlenkaF,
HuaHuaY,
pitrou,
raulcd,
rok and
wgtmac
as code owners
October 11, 2026 02:12
|
|
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.
Rationale for this change
Fixes #50142. Writing
time64[ns]with Parquet version 1.0 or 2.4 currently emitsTIME(NANOS), and explicitcoerce_timestampsoptions leave time-of-day fields unchanged. For example, a value of 1,000 nanoseconds remainsTIME(NANOS)instead of becoming 1 microsecond under version 2.4.Credit to fenfeng9's analysis for separating the compatibility bug from the existing timestamp-only option semantics. This follows the agreed direction to reuse the existing coercion options, rather than adding time-specific options. The footer's reported
format_versionis not changed.What changes are included in this PR?
Are these changes tested?
parquet-arrow-reader-writer-test: 834 passed; two unsupported dictionary cases skipped and one existing large-string test disabled.parquet-arrow-metadata-test: 49 passed.test_datetime.py, with Parquet and pandas groups enabled, against locally built PyArrow: 48 passed, including 29 focused time cases.git diff --checkpass.Are there any user-facing changes?
coerce_timestampsandallow_truncated_timestampsnow also apply to Arrow time32/time64 fields. Without explicit coercion, nanosecond times are converted to microseconds for versions 1.0/2.4 and preserved for 2.6. Lossy conversion raises an error unless an explicit coercion target andallow_truncated_timestamps=Trueare both provided.Was AI used for this PR?
Codex assisted with the investigation, implementation, tests, documentation and PR description, and reviewed the changes before submission.
PR code and description written by:
Reviewed before submission by: