Skip to content

Kudu: add kudu.timezone for TIMESTAMP conversion#352

Closed
zy-kkk wants to merge 1 commit intoapache:trino-435-kudufrom
zy-kkk:trino-435-kudu-timezone
Closed

Kudu: add kudu.timezone for TIMESTAMP conversion#352
zy-kkk wants to merge 1 commit intoapache:trino-435-kudufrom
zy-kkk:trino-435-kudu-timezone

Conversation

@zy-kkk
Copy link
Member

@zy-kkk zy-kkk commented Aug 25, 2025

  • Summary: Introduces kudu.timezone to control how TIMESTAMP values are conver
    ted between Trino and Kudu,to ensure co
    nsistent semantics when Kudu stores UTC timestamps while users expect local time
    interpretation.
  • Changes:
    • KuduClientConfig: add kudu.timezone (default UTC), initialize timezone o
      ffset via TimestampHelper.
    • TimestampHelper: new utility using java.time to compute zone offset in mil
      liseconds and cache it.
    • KuduPageSink: when writing TIMESTAMP_MILLIS, subtract the offset (applied
      in microseconds).
    • TypeHelper: when reading TIMESTAMP_MILLIS, add the offset; adjust getJava Value and getLong.
    • Docs: add #kudu.timezone = UTC to Kudu connector configuration docs.
  • Usage:
    • Set in etc/catalog/kudu.properties: kudu.timezone=Asia/Shanghai (default
      s to UTC).

@morningman morningman deleted the branch apache:trino-435-kudu January 29, 2026 13:54
@morningman morningman closed this Jan 29, 2026
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.

2 participants