Skip to content

[SPARK-57160][CONNECT][FOLLOW-UP] Use signed nanos timestamp fields - #57421

Closed
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:followup-nanos-proto-dev1
Closed

[SPARK-57160][CONNECT][FOLLOW-UP] Use signed nanos timestamp fields#57421
zhengruifeng wants to merge 1 commit into
apache:masterfrom
zhengruifeng:followup-nanos-proto-dev1

Conversation

@zhengruifeng

@zhengruifeng zhengruifeng commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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)

Align nanos timestamp protocol fields with Spark signed integer types and document the default precision.
@zhengruifeng zhengruifeng changed the title [WIP][MINOR][CONNECT] Use signed nanos timestamp fields [SPARK-57160][CONNECT][FOLLOW-UP Use signed nanos timestamp fields Jul 22, 2026
@zhengruifeng zhengruifeng changed the title [SPARK-57160][CONNECT][FOLLOW-UP Use signed nanos timestamp fields [SPARK-57160][CONNECT][FOLLOW-UP] Use signed nanos timestamp fields Jul 22, 2026
@zhengruifeng
zhengruifeng marked this pull request as ready for review July 22, 2026 07:17
@uros-b

uros-b commented Jul 22, 2026

Copy link
Copy Markdown
Member

Thank you @zhengruifeng!

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM.

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>
@dongjoon-hyun

Copy link
Copy Markdown
Member

Merge Summary:

Posted by merge_spark_pr.py

@zhengruifeng
zhengruifeng deleted the followup-nanos-proto-dev1 branch July 22, 2026 23:59
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.

3 participants