github-actions[bot] commented on code in PR #63543:
URL: https://github.com/apache/doris/pull/63543#discussion_r3340437349


##########
fs_brokers/cdc_client/src/main/java/org/apache/doris/cdcclient/source/deserialize/DebeziumJsonDeserializer.java:
##########
@@ -317,6 +322,18 @@ private Object convertZoneTimestamp(Object dbzObj) {
         return dbzObj.toString();
     }
 
+    private Object convertZoneTime(Object dbzObj) {
+        // timetz arrives as a UTC-normalized ISO string; render it via 
serverTimeZone, mirroring
+        // timestamptz.
+        if (dbzObj instanceof String) {
+            OffsetTime utcTime = OffsetTime.parse((String) dbzObj);
+            ZoneOffset offset = 
serverTimeZone.getRules().getOffset(Instant.EPOCH);

Review Comment:
   This uses the configured zone's offset at `Instant.EPOCH`, so any IANA zone 
with DST renders `time with time zone` using the winter/standard offset even 
when the source value was written under a daylight-saving offset. For example, 
with `timezone=America/New_York`, a PostgreSQL session in summer stores 
`11:00:00-04` and Debezium's `ZonedTime` is normalized to `15:00:00Z`; this 
code takes New York's epoch offset (`-05:00`) and emits `10:00`, while the 
source wall clock and the matching `timestamptz` path would render as `11:00`. 
The new tests only use `Asia/Tokyo`, whose epoch offset equals its current 
offset, so they mask the bug. Please avoid the epoch-offset shortcut for named 
zones or restrict this path to fixed-offset zones and add a DST-zone test so 
CDC does not silently shift `timetz` by one hour for common source timezones.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to