davidzollo commented on issue #8259:
URL: https://github.com/apache/seatunnel/issues/8259#issuecomment-4395724294

   From the current source code, `TRUNCATE TABLE` is still **not supported** in 
the MySQL-CDC schema-evolution pipeline.
   
   The key point is that there are two different capabilities here:
   
   1. `TRUNCATE TABLE` as a catalog action on the sink side.
      SeaTunnel's JDBC catalog already has MySQL truncate SQL generation, so a 
sink/catalog can execute `TRUNCATE TABLE` in save-mode related paths.
   
   2. Capturing MySQL `TRUNCATE TABLE` from CDC source and propagating it 
downstream as a schema/data-change event.
      Issue #8259 is about this part, and this part is not implemented yet.
   
   The current code path shows why:
   
   - MySQL CDC streaming does read DDL from binlog and dispatch schema change 
events.
   - But the resolver only accepts DDL that matches `ALTER TABLE`.
   - The MySQL incremental source currently declares support only for 
`ADD_COLUMN`, `DROP_COLUMN`, `RENAME_COLUMN`, and `UPDATE_COLUMN`.
   - The resolver/parser output is also column-alter oriented, and there is no 
`TRUNCATE` schema change type in the current SeaTunnel schema-change event 
model.
   
   So the issue being closed does **not** mean the feature is already available 
now. Based on the current implementation, it looks more like the request was 
closed without the end-to-end capability being completed.
   
   If we want to support this feature, it would need at least these pieces:
   
   - add a `TRUNCATE`-style schema/data change event in the SeaTunnel event 
model
   - let the MySQL CDC resolver/parser recognize `TRUNCATE TABLE`
   - define how downstream sinks should consume and execute that event safely
   - add docs and e2e coverage
   
   In short: `mysql-cdc source receives TRUNCATE DDL and propagates it to sink` 
is **not in the current supported set**.
   


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