DanielLeens commented on issue #10852:
URL: https://github.com/apache/seatunnel/issues/10852#issuecomment-4402594187

   Thanks for the clear reproduction. I checked the current SQLite JDBC dialect 
code, and this does look like a real bug rather than a configuration issue.
   
   The failing path is `SqliteDialect#getUpsertStatement`. In the current 
implementation, the `ON CONFLICT ... DO UPDATE` branch is generated as `column 
= VALUES(column)`.
   
   That syntax is MySQL-style. For SQLite UPSERT, the conflict-update side 
should reference the incoming row through `excluded.column` instead. So the SQL 
error you reported is consistent with the current SeaTunnel-generated statement 
when `generate_sink_sql = true` goes through the upsert path.
   
   I also rechecked the current `dev` code, and I do not see this corrected 
there yet.
   
   As a temporary workaround, you can:
   1. use a custom sink `query` with SQLite-compatible UPSERT SQL
   2. or avoid the upsert path if insert-only semantics are acceptable for your 
job
   
   This issue is worth keeping open for follow-up. If you would like to 
contribute a fix, the smallest useful scope would be:
   - adjust the SQLite dialect upsert SQL generation
   - add a regression test for the generated statement
   
   Thanks again for the precise report.


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