DanielLeens commented on issue #13384: URL: https://github.com/apache/seatunnel/issues/13384#issuecomment-7062349100
Classification: A / Transform-V2 CDC changelog filtering. Thank you for the minimal CDC reproduction and for checking the affected sink contracts. I agree that the correction belongs at the SQL-transform boundary, not in separate sink implementations. The current Zeta path returns no row as soon as the `WHERE` predicate is false, while retained rows keep their original row kind; the Calcite path has the same observable gap for a filtered `UPDATE_AFTER`. I prefer option 1, with one narrow and explicit rule: when a `WHERE` rejects an `UPDATE_AFTER`, the transform must emit a `DELETE` row built from that projected after-image rather than dropping it. This makes a matching-to-nonmatching transition visible to upsert sinks without adding sink-specific buffering. If both images do not match, the delete is an idempotent no-op for a keyed target. It also avoids relying on a complete `UPDATE_BEFORE` image. Please keep the first PR limited to the SQL transform implementations; do not change individual sinks. It must apply the same rule to the Zeta and Calcite engines, retain the key columns required by the downstream delete, and document that CDC filtering can emit deletes when a row leaves the predicate. The regression coverage should include, for both engines, row-kind assertions for insert/delete/update-before/update-after through matching and nonmatching predicates. Please also add a CDC `FakeSource -> Sql -> Jdbc` integration case that proves the final keyed table removes `active -> inactive` and admits `inactive -> active`, with exact final rows. The English and Chinese SQL-transform documentation should describe the changelog behavior and the keyed-delete requirement. Please open the focused PR against current `dev` and link it here. -- 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]
