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

   ### Purpose of this pull request
   
   Fixes #12500. DuckDB allows `"` inside a quoted table, column, or constraint 
name, but the JDBC dialect and CREATE TABLE builder emitted the name without 
doubling the embedded quote. Generated SQL then failed for otherwise valid 
identifiers. Both paths now quote each identifier component and escape embedded 
quotes; the two-argument dialect path also keeps a table name containing `.` 
intact.
   
   ### Does this PR introduce any user-facing change?
   
   Yes. DuckDB source/sink generated SQL and catalog table creation now work 
with valid quoted identifiers such as `odd"table` and `odd"column`. Ordinary 
names produce the same SQL as before. No new option or configuration is 
introduced.
   
   ### How was this patch tested?
   
   Added DuckDB JDBC regression tests that create/query a table with embedded 
quotes and copy a catalog table whose table and column names contain quotes. 
Ran on JDK 17:
   
   ```text
   mvn -o -pl seatunnel-connectors-v2/connector-jdbc -DskipITs 
-Dcheckstyle.skip -Dlicense.skip -Dtest=DuckDBDialectTest,DuckDBCatalogTest test
   DuckDBDialectTest: 8 tests, 0 failures
   DuckDBCatalogTest: 9 tests, 0 failures
   ```
   
   ### Check list
   
   - [x] Targeted tests added and passing
   - [x] No new connector, dependency, configuration, or incompatible change
   


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