SEZ9 commented on issue #13407:
URL: https://github.com/apache/seatunnel/issues/13407#issuecomment-7204426503

   @Sachin-nsk Thanks, sounds good. Please go ahead with the PostgreSQL-only PR 
for `update_condition_sql`.
   
   So the PR is easy to review against what was agreed here, please make sure 
it covers the following:
   
   - **Condition parsing:** build the SQL from a bounded parser/AST, using 
quoted identifiers from the known schema, and never pass the user text through 
as a SQL fragment. Anything unsupported (unknown columns, functions, casts, 
literals, other qualification forms) should fail at job validation.
   - **Prerequisites:** the job should stop at startup unless 
`generate_sink_sql = true`, `primary_keys` is set and `enable_upsert = true`.
   - **Ordering:** the all-changes-in-order behavior applies only to PostgreSQL 
when `update_condition_sql` is set. Jobs without the option, and other 
dialects, keep the current last-change reduction.
   - **Batch boundary:** flush the pending batch explicitly when a repeated key 
arrives, including with `reWriteBatchedInserts=true`, rather than relying on 
driver batching behavior.
   - **Tests:** PostgreSQL container tests should assert exact final rows for:
     - both input orders;
     - missing keys;
     - true, false and NULL predicates;
     - composite keys;
     - a repeated key with rewriting enabled and disabled;
     - the option absent, showing the existing reduction behavior is unchanged.
   - **Docs:** matching EN and ZH docs, including that DELETE is deliberately 
not covered by the condition.
   
   Please also list these constraints in the PR description and link the PR 
back here once it is open.
   
   <!-- streview-comment:2645 -->


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