hutiefang76 opened a new issue, #12500:
URL: https://github.com/apache/seatunnel/issues/12500

   ### What happened
   
   The DuckDB JDBC dialect and CREATE TABLE builder wrap identifiers in double 
quotes without escaping double quotes inside the identifier. A legal DuckDB 
table or column name such as `odd"table` therefore produces malformed SQL 
(`"odd"table"`) when used through generated SQL. The dialect's two-argument 
`tableIdentifier` also reconstructs a table path by concatenating strings, 
which splits a table name containing a dot.
   
   ### Expected behavior
   
   Each identifier component should be quoted independently and embedded double 
quotes should be doubled, as DuckDB SQL requires. This should apply to 
generated source/sink SQL and catalog CREATE TABLE SQL, including 
constraint/index names.
   
   ### Reproduction
   
   Create `"main"."odd""table" ("odd""column" INTEGER)` through DuckDB JDBC and 
use the DuckDB dialect to generate the table and column identifiers. The 
unescaped SQL cannot be executed; the correctly escaped SQL can be inserted 
into and read back.
   


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