1328837476-hug commented on issue #10443:
URL: https://github.com/apache/seatunnel/issues/10443#issuecomment-5603830552

   Thanks for the clarification. I reviewed the current `dev` JDBC path at 
commit `75fd4ed4b2e63579a57b461285997951490c4fe7`.
   
   | Area | Current generic JDBC behavior | Ingres compatibility / deviation |
   |---|---|---|
   | Driver | SeaTunnel loads the configured driver class through the context 
classloader, so the driver can remain user-provided. | The current Actian 
artifact is `com.ingres.jdbc:iijdbc:12.1-4.6.5`, driver class 
`com.ingres.jdbc.IngresDriver`. Its Maven metadata declares a commercial 
license with redistribution restrictions. I will not add or bundle this 
dependency. |
   | JDBC URL detection | `GenericDialectFactory` accepts unmatched JDBC URLs. 
The loader removes Generic only when a specific factory matches. | 
`jdbc:ingres://...` currently falls back to Generic. PostgreSQL accepts only 
`jdbc:postgresql:`, so Ingres does not enter the PostgreSQL path. |
   | Source | The generic path loads schema through JDBC `ResultSetMetaData`, 
using `GenericTypeMapper`, when no catalog factory exists. Query-based reads 
therefore have a viable code path with a user-installed driver. | Live 
execution is still unverified. Owner/schema-qualified table paths and 
identifier case need focused verification. |
   | Sink | Plain append INSERT uses generic generated SQL and the generic row 
converter. | Plain append has a viable code path. Native upsert is not 
currently usable because `GenericDialect.getUpsertStatement()` throws 
`UnsupportedOperationException`. |
   | Identifier quoting | Generic returns identifiers unchanged. | Ingres 
delimited identifiers use double quotes, embedded quotes must be doubled, and 
delimited identifier case is significant. This is a concrete dialect deviation. 
|
   | Table paths | Generic parsing does not model a schema/owner-qualified 
path. | Ingres treats schema names as object owners and JDBC 
`Connection.getSchema()` returns `null`; `owner.table` handling needs an 
Ingres-specific parse/table-identifier override. |
   | Type mapping | Generic maps the standard JDBC numeric, character, binary, 
date, time, and timestamp type codes. | Actian documents JDBC 4.2 conversions 
for those standard types and does not support ARRAY, DATALINK, DISTINCT, 
JAVA_OBJECT, REF, REF_CURSOR, ROWID, SQLXML, or STRUCT. The metadata codes and 
behavior of Ingres-specific types such as `INGRESDATE`, `MONEY`, and intervals 
remain a live-test boundary. |
   | Upsert | With primary keys and the default `enable_upsert=true`, Generic 
reaches the unsupported native-upsert method. With a dialect returning 
`Optional.empty()`, SeaTunnel can use its existing row-existence plus 
INSERT/UPDATE fallback. | Ingres supports `MERGE`, but I propose not adding 
speculative native MERGE SQL in the first slice. The initial dialect can 
explicitly use the existing fallback until real JDBC behavior is verified. |
   
   Proposed first implementation, after agreement:
   
   1. Add only an Ingres JDBC dialect/factory inside `connector-jdbc`, 
recognizing `jdbc:ingres:`.
   2. Reuse the generic row converter and standard type mapper.
   3. Override only confirmed differences: double-quoted identifier escaping, 
owner-qualified table paths, and an explicit non-native-upsert fallback.
   4. Add focused factory, quoting, path, SQL-generation, and standard 
type-mapping tests.
   5. Add documentation stating that users must supply the commercially 
licensed driver themselves.
   
   Validation boundary: Actian publishes an official `actian/ingres` image, but 
standalone use requires a valid `license.xml` and explicit license acceptance. 
I do not currently have a licensed Ingres test instance, so I cannot claim a 
live JDBC integration result before the PR. I will keep all Ingres-specific 
types and native MERGE behavior out of scope unless a licensed test environment 
becomes available.
   
   References:
   - [Actian driver coordinates and 
license](https://central.sonatype.com/artifact/com.ingres.jdbc/iijdbc)
   - [Official JDBC URL and driver 
class](https://docs.actian.com/actianingres/12.0/Connectivity/JDBC_Driver_and_Data_Source_Classes.htm)
   - [Ingres identifier 
rules](https://docs.actian.com/actianx/12.0/OpenSQLRef/Restrictions_on_Identifiers.htm)
   - [Official Docker image and license 
requirements](https://hub.docker.com/r/actian/ingres)
   
   If this evidence and validation boundary are acceptable, I will implement 
only the narrow dialect/factory slice above—no CDC, standalone connector, 
catalog redesign, bundled driver, or speculative DDL.


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