[SPARK-57160][CONNECT][FOLLOW-UP] Use signed nanos timestamp fields - #57421
Closed
zhengruifeng wants to merge 1 commit into
Closed
[SPARK-57160][CONNECT][FOLLOW-UP] Use signed nanos timestamp fields#57421zhengruifeng wants to merge 1 commit into
zhengruifeng wants to merge 1 commit into
Conversation
Align nanos timestamp protocol fields with Spark signed integer types and document the default precision.
zhengruifeng
marked this pull request as ready for review
July 22, 2026 07:17
uros-b
approved these changes
Jul 22, 2026
Member
|
Thank you @zhengruifeng! |
dongjoon-hyun
pushed a commit
that referenced
this pull request
Jul 22, 2026
### What changes were proposed in this pull request? This follow-up to bc72d93 aligns the nanosecond timestamp protocol fields with Spark signed integer types. - Changes the nanos remainder and precision fields for both NTZ and LTZ timestamp literals from `uint32` to `int32`. - Changes the timestamp-nanos data type precision fields to `int32` and documents that an omitted precision defaults to 9. - Regenerates the affected Python protobuf descriptors. The new protobuf messages are not consumed by the Connect server or client yet, so this is a pure protobuf-schema change. ### Why are the changes needed? These values are represented as signed `Int` values in Spark. The valid ranges remain non-negative (precision 7 through 9; nanos within a microsecond 0 through 999), so the schema keeps the same field numbers and behavior while matching the rest of Spark. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? - Ran `./dev/connect-gen-protos.sh` successfully to regenerate the Python protobuf descriptors. - Ran `git diff --check` successfully. - Attempted `buf lint`, but the locally installed Buf reports existing repository-wide lint violations in unrelated proto files. - Attempted a focused Python descriptor assertion, but the available protobuf runtime predates the regenerated code. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Codex (GPT-5) Closes #57421 from zhengruifeng/followup-nanos-proto-dev1. Authored-by: Ruifeng Zheng <ruifengz@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 4a1d0a7) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Member
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?
This follow-up to bc72d93 aligns the nanosecond timestamp protocol fields with Spark signed integer types.
uint32toint32.int32and documents that an omitted precision defaults to 9.The new protobuf messages are not consumed by the Connect server or client yet, so this is a pure protobuf-schema change.
Why are the changes needed?
These values are represented as signed
Intvalues in Spark. The valid ranges remain non-negative (precision 7 through 9; nanos within a microsecond 0 through 999), so the schema keeps the same field numbers and behavior while matching the rest of Spark.Does this PR introduce any user-facing change?
No.
How was this patch tested?
./dev/connect-gen-protos.shsuccessfully to regenerate the Python protobuf descriptors.git diff --checksuccessfully.buf lint, but the locally installed Buf reports existing repository-wide lint violations in unrelated proto files.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Codex (GPT-5)