doris-thirdparty icon indicating copy to clipboard operation
doris-thirdparty copied to clipboard

Kudu: add kudu.timezone for TIMESTAMP conversion

Open zy-kkk opened this issue 5 months ago • 0 comments

  • 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).

zy-kkk avatar Aug 25 '25 10:08 zy-kkk