doris-thirdparty
doris-thirdparty copied to clipboard
Kudu: add kudu.timezone for TIMESTAMP conversion
- Summary: Introduces
kudu.timezoneto 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(defaultUTC), initialize timezone o ffset viaTimestampHelper. - TimestampHelper: new utility using
java.timeto 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; adjustgetJava ValueandgetLong. - Docs: add
#kudu.timezone = UTCto Kudu connector configuration docs.
- KuduClientConfig: add
- Usage:
- Set in
etc/catalog/kudu.properties:kudu.timezone=Asia/Shanghai(default s toUTC).
- Set in