SEZ9 commented on issue #13384:
URL: https://github.com/apache/seatunnel/issues/13384#issuecomment-7114197413
@SEPURI-SAI-KRISHNA thanks for running both checks on bf5223b0ba.
**1. Key columns:** no, I would not gate the `DELETE` on the output schema
keeping a primary key. As you said yourself, that leaves the old bug for a
source without a key whose sink sets `primary_keys`, and @zhangshenghang raised
the same gap.
Documenting the key as a requirement is also not enough. In the keyless Jdbc
case you found, the plain INSERT executor writes the `DELETE` as a new row,
which is new behavior compared to dev.
Please follow @zhangshenghang's direction instead: keep the existing `WHERE`
behavior by default, and make the synthetic `DELETE` opt-in for jobs with a
stable downstream key and a delete-capable sink.
**2. Row kinds:** `testWhereOnChangelogRows` in `SQLTransformTest` and
`CalciteSQLEngineTest`, as you describe it, settles this point. Once the opt-in
exists, please have it assert the row kinds for both the default and the opt-in
setting.
What is left before #13393 can merge:
- **Opt-in switch:** apply it identically in the Zeta and Calcite engines,
and post the option name and default you propose here or in the PR description.
- **E2E cases:** add exact final-row assertions for both Sql and Calcite,
covering:
- a schema primary key;
- a sink-configured key without a schema primary key;
- keyless append-only JDBC with the default behavior.
- **Docs:** describe the stable-key and projection limits in both EN and ZH,
including what happens when the query does not select the key.
<!-- streview-comment:2555 -->
--
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]