JacobZheng0927 opened a new issue, #13032:
URL: https://github.com/apache/seatunnel/issues/13032
### What happened
A primary-key JDBC sink using the SAP HANA dialect generates SQL with a
target alias:
```sql
MERGE INTO "S"."T" AS TARGET
USING (SELECT 'value' AS "PAYLOAD", 1 AS "ID" FROM DUMMY) AS SOURCE
ON (TARGET."ID" = SOURCE."ID")
WHEN MATCHED THEN UPDATE SET TARGET."PAYLOAD" = SOURCE."PAYLOAD"
WHEN NOT MATCHED THEN INSERT ("PAYLOAD", "ID") VALUES (SOURCE."PAYLOAD",
SOURCE."ID")
```
HANA `2.00.033.00.1535711040` rejects this target-alias syntax. The same
generated statement succeeds when the target alias is omitted, the ON predicate
refers to `"S"."T"."ID"`, and the assignment target is unqualified. Checked
against current `dev` (`cec3276740d9`).
### Expected behavior
Generated HANA upserts should use syntax that also works on this older HANA
version, retaining named parameter order and primary-key-only table behavior.
### Reproduction
Create a schema-qualified HANA table with an integer primary key and
nullable payload, then execute the generated MERGE above. The insert/update
fails before writing a row. Newer HANA revisions may accept aliases; this is a
compatibility failure on the version above.
--
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]