dyp12 commented on code in PR #9701:
URL: https://github.com/apache/seatunnel/pull/9701#discussion_r2284401358


##########
seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/canal/CanalJsonSerializationSchema.java:
##########
@@ -62,6 +67,15 @@ public byte[] serialize(SeaTunnelRow row) {
             String opType = rowKind2String(row.getRowKind());
             reuse.setField(0, new SeaTunnelRow[] {row});
             reuse.setField(1, opType);
+            if (!StringUtils.isEmpty(row.getTableId())) {
+                reuse.setField(2, 
TablePath.of(row.getTableId()).getDatabaseName());
+                reuse.setField(3, 
TablePath.of(row.getTableId()).getTableName());
+            }
+
+            if (row.getOptions() != null && 
row.getOptions().containsKey(EVENT_TIME.getName())) {
+                reuse.setField(4, row.getOptions().get(EVENT_TIME.getName()));

Review Comment:
   > Should we standardize the precision of eventtime? I see that the unit is 
sometimes seconds and sometimes milliseconds. Can we standardize it to 
milliseconds?
   
   now all use milliseconds,when read data ,all eventtime is milliseconds
   <img width="881" height="231" alt="image" 
src="https://github.com/user-attachments/assets/4797a63e-8e25-4a45-b9fd-3d6af7f89bee";
 />
   



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