zhangshenghang opened a new pull request, #10996:
URL: https://github.com/apache/seatunnel/pull/10996

   ### Purpose of this pull request
   
   Add an opt-in Oracle JDBC sink insert optimization option:
   
   ```hocon
   oracle_insert_mode = APPEND_VALUES
   ```
   
   When enabled for supported Oracle insert-only generated SQL writes, 
SeaTunnel injects the Oracle `APPEND_VALUES` hint into the generated insert 
statement:
   
   ```sql
   INSERT /*+ APPEND_VALUES */ INTO ...
   ```
   
   The default mode is `CONVENTIONAL`, so existing jobs keep the current JDBC 
insert behavior unless users explicitly enable this option.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes.
   
   This PR adds a new optional JDBC sink config `oracle_insert_mode`, with 
default value `CONVENTIONAL`. Existing jobs are not affected by default.
   
   `APPEND_VALUES` is restricted to Oracle insert-only generated SQL writes and 
requires:
   
   - `generate_sink_sql = true`
   - `auto_commit = true`
   - no custom `query`
   - no `primary_keys`
   - `is_exactly_once = false`
   - `support_upsert_by_insert_only = false`
   
   ### How was this patch tested?
   
   ```bash
   ./mvnw -pl seatunnel-api -DskipTests -Dspotless.check.skip=true 
-Dmaven.gitcommitid.skip=true install
   ```
   
   ```bash
   ./mvnw -pl seatunnel-connectors-v2/connector-jdbc \
     -Dtest=JdbcOutputFormatBuilderTest \
     -DfailIfNoTests=false \
     -Dmaven.gitcommitid.skip=true test
   ```
   
   Result: `Tests run: 9, Failures: 0, Errors: 0, Skipped: 0`.
   
   ```bash
   ./mvnw -pl seatunnel-connectors-v2/connector-jdbc \
     -DskipTests \
     -Dmaven.gitcommitid.skip=true verify
   ```
   
   Result: `BUILD SUCCESS`.
   
   ```bash
   ./mvnw -pl 
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-1
 \
     -DskipTests \
     -Dmaven.gitcommitid.skip=true package
   ```
   
   Result: `BUILD SUCCESS`.
   
   Attempted Oracle E2E locally:
   
   ```bash
   ./mvnw -pl 
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-jdbc-e2e/connector-jdbc-e2e-part-1
 \
     -Dtest=JdbcOracleIT \
     -DfailIfNoTests=false \
     -Dmaven.gitcommitid.skip=true test
   ```
   
   It reached `JdbcOracleIT` startup but failed before running the test cases 
because the local machine has no valid Docker/Testcontainers environment:
   
   ```text
   Could not find a valid Docker environment
   ```
   
   ### Check list
   
   - [x] Added no new Jar dependency
   - [x] Updated docs/en and docs/zh
   - [x] No incompatible change, default behavior remains unchanged
   - [x] Added unit tests and Oracle JDBC E2E coverage
   


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