yuxiqian commented on PR #3449:
URL: https://github.com/apache/flink-cdc/pull/3449#issuecomment-2270865553

   I've added a draft integrated test case for this at my branch 
[here](https://github.com/yuxiqian/flink-cdc/tree/FLINK-35743-patch), but 
noticed something strange. Run 
`FlinkPipelineTransformITCase#testTransformWithTemporalFunction` reveals that:
   
   ```
   Output for manual check:
   
   CreateTableEvent{tableId=default_namespace.default_schema.mytable1, 
schema=columns={`id` INT,`name` STRING,`age` INT,`lcl_t` TIME(0),`cur_t` 
TIME(0),`cur_ts` TIMESTAMP_LTZ(3),`now_ts` TIMESTAMP_LTZ(3),`lcl_ts` 
TIMESTAMP(3),`cur_dt` DATE}, primaryKeys=id, options=()}
   DataChangeEvent{tableId=default_namespace.default_schema.mytable1, 
before=[], after=[1, Alice, 18, 6410611, 6410611, 2024-08-06T09:46:50.611, 
2024-08-06T09:46:50.611, 2024-08-06T01:46:50.611, 19941], op=INSERT, meta=()}
   DataChangeEvent{tableId=default_namespace.default_schema.mytable1, 
before=[], after=[2, Bob, 20, 6410818, 6410818, 2024-08-06T09:46:50.818, 
2024-08-06T09:46:50.818, 2024-08-06T01:46:50.818, 19941], op=INSERT, meta=()}
   DataChangeEvent{tableId=default_namespace.default_schema.mytable1, 
before=[2, Bob, 20, 6410819, 6410819, 2024-08-06T09:46:50.819, 
2024-08-06T09:46:50.819, 2024-08-06T01:46:50.819, 19941], after=[2, Bob, 30, 
6410819, 6410819, 2024-08-06T09:46:50.819, 2024-08-06T09:46:50.819, 
2024-08-06T01:46:50.819, 19941], op=UPDATE, meta=()}
   CreateTableEvent{tableId=default_namespace.default_schema.mytable2, 
schema=columns={`id` BIGINT,`name` STRING,`age` TINYINT,`description` 
STRING,`lcl_t` TIME(0),`cur_t` TIME(0),`cur_ts` TIMESTAMP_LTZ(3),`now_ts` 
TIMESTAMP_LTZ(3),`lcl_ts` TIMESTAMP(3),`cur_dt` DATE}, primaryKeys=id, 
options=()}
   DataChangeEvent{tableId=default_namespace.default_schema.mytable2, 
before=[], after=[3, Carol, 15, student, 6411969, 6411969, 
2024-08-06T09:46:51.969, 2024-08-06T09:46:51.969, 2024-08-06T01:46:51.969, 
19941], op=INSERT, meta=()}
   DataChangeEvent{tableId=default_namespace.default_schema.mytable2, 
before=[], after=[4, Derrida, 25, student, 6411972, 6411972, 
2024-08-06T09:46:51.972, 2024-08-06T09:46:51.972, 2024-08-06T01:46:51.972, 
19941], op=INSERT, meta=()}
   DataChangeEvent{tableId=default_namespace.default_schema.mytable2, 
before=[4, Derrida, 25, student, 6411973, 6411973, 2024-08-06T09:46:51.973, 
2024-08-06T09:46:51.973, 2024-08-06T01:46:51.973, 19941], after=[], op=DELETE, 
meta=()}
   ```
   
   (Pipeline local time zone was set to `GMT-08:00`.)
   
   IIUC, `CURRENT_TIMESTAMP`, `NOW()`, and `LOCALTIMESTAMP` should prints out 
identical timestamp, since they either 1) ignores the timestamp or 2) converts 
internally to appears like local timestamp, but seems there's an 8 hour gap.


-- 
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]

Reply via email to