1328837476-hug opened a new pull request, #12907: URL: https://github.com/apache/seatunnel/pull/12907
### Purpose of this pull request Ingres URLs currently fall back to the generic JDBC dialect, which does not quote identifiers and interprets a two-part table path as database/table instead of owner/table. This PR adds a small Ingres dialect within the existing Jdbc connector. I'm happy to contribute this scoped support to Apache SeaTunnel. Related to #10443, following the [compatibility matrix and scope discussion](https://github.com/apache/seatunnel/issues/10443#issuecomment-5603830552). - Register an Ingres dialect factory for `jdbc:ingres:` and explicit `dialect = "Ingres"` selection. - Quote identifiers with double quotes, escape embedded quotes, and keep owner/table case independent of `field_ide`. - Interpret `owner.table` using the existing schema-first `TablePath` parser. The database remains selected by the JDBC URL. - Reuse the generic JDBC type mapper and row converter. Return `Optional.empty()` for native upsert so the existing query/insert/update fallback remains available. - Disable the unverified generic hash expression for Ingres; string keys use the existing single-split fallback. - Add focused tests, an opt-in real-instance source test, and English/Chinese documentation. ### Does this PR introduce any user-facing change? Yes. Ingres URLs now select the Ingres dialect automatically. For example, `table_path = "sales_owner.orders"` generates `"sales_owner"."orders"`. The documentation recommends an explicit owner to avoid ambiguous JDBC metadata when different owners have tables with the same name. This is deliberately limited to standard JDBC type handling and source integration. It does not add a separate connector, catalog, schema creation, CDC, native MERGE/upsert, or mappings for Ingres-specific types such as INGRESDATE, MONEY, and intervals. It adds no driver dependency or binary: users must supply `iijdbc.jar` under the applicable Actian license. The existing Jdbc plugin registration and distribution entries are reused. ### How was this patch tested? Local environment: JDK 17 and the Maven wrapper. - `./mvnw spotless:apply` — passed; changed modules were formatted again after review fixes. - `./mvnw -pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-7 -am -DskipTests -Dskip.ui=true verify` — all 68 reactor modules passed, including compilation of the new integration test. Tests and the unrelated Web UI build were skipped in this command. - `./mvnw -pl seatunnel-connectors-v2/connector-jdbc -Dtest=IngresDialectTest,JdbcDialectLoaderTest test` — 27 tests passed. Before the implementation, the same tests exposed 10 failures/errors in the missing Ingres behavior. - `./mvnw -pl seatunnel-connectors-v2/connector-jdbc install` — 1,120 tests ran: 1 failure and 10 skipped. The sole failure is `JdbcOptionRuleCompletenessTest.testSinkRuleDeclaresAllSinkOptions`, which reports the undeclared `numeric_special_value_as_null` option. I reproduced the identical failure on an untouched checkout of base commit `e2957d27afa29d4de4324cf642450757d865b902`; it is outside this change. Test coverage: | Area | Tests | | --- | --- | | SPI URL and explicit dialect selection; unrelated URL regression | `JdbcDialectLoaderTest.shouldFindIngresDialect`, `shouldFindIngresDialectByName`, `shouldKeepOtherUrlDialects` | | Quoting, embedded quotes, dots within individual identifiers, field case | `IngresDialectTest.testQuoteIdentifier`, `testConfiguredFieldCase`, `testTableIdentifierEscapesEachComponent` | | Owner paths and SQL generation | `testParseOwnerQualifiedTable`, `testUnqualifiedTable`, `testSqlStatementsUseQuotedOwnerAndColumns` | | Existing upsert fallback and disabled hash splitting | `testUsesExistingNonNativeUpsertFallback`, `testDoesNotUseUnverifiedHashSplitting` | | Standard JDBC metadata types | `testStandardJdbcTypeMapping` (13 parameterized cases) | | Real source metadata discovery and row conversion | Opt-in `JdbcIngresIT.testIngresSource` | Real-server validation is still open. I do not have a licensed Ingres instance available, so I have not run `JdbcIngresIT` and am keeping this PR as a draft. The test accepts an external instance and a user-supplied driver, creates a uniquely named fixture table, reads its two rows separately through Jdbc Source into Assert, checks quoted columns, NULL and decimal values, and cleans up its table. Setup is documented in `connector-jdbc-e2e-part-7/README-ingres.md`. Offline tests do not establish compatibility with a particular Ingres server/driver version, and sink execution is not claimed as verified. ### Check list - [x] Updated English and Chinese documentation. - [x] Added dialect/loading tests and an opt-in E2E test. - [x] No new dependency or bundled binary. - [x] No existing configuration name, default, or SPI contract changed. - [ ] Run the opt-in test against a licensed Ingres instance and record the server/driver versions. -- 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]
