Sachin-nsk commented on issue #13407:
URL: https://github.com/apache/seatunnel/issues/13407#issuecomment-7233400722

   @SEZ9  Thanks for the review and the questions.
   
   1. Yes. A missing primary_keys stops the job at startup, when the sink is 
created, before any row is written.
   2. Batching behaviour:
      - With reWriteBatchedInserts=true, every upsert row is executed on its 
own, not only a repeated key.
      - The sink reads the setting from the url and properties the way the 
PostgreSQL driver does.
      - With rewriting disabled, the boundary is still explicit: when a row's 
key is already in the pending batch, that batch is executed first. Keys are 
compared as Java values, and keys containing NULL are not tracked.
   
   This differs from my earlier plan for the rewrite case. PostgreSQL can treat 
keys as equal that differ in Java (for example numeric 1.0 and 1.00), so the 
repeat check misses them, and a rewritten statement then fails because it 
affects the same row twice.
   
   The PR description now covers both settings. testUpdateConditionSql in 
JdbcPostgresIT asserts the exact final rows for repeated keys in both input 
orders, with rewriting enabled and disabled.


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