You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhangshenghang (via GitHub)" <gi...@apache.org> on 2026/09/28 14:01:58 UTC

[I] [Bug][Connector-V2][JDBC] Named parameters cannot resolve sink column names containing spaces [seatunnel]

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

   ### Description
   
   The JDBC sink parses named parameters (`:name`) in user SQL with the regular expression `:([\p{L}\p{Nl}\p{Nd}\p{Pc}\$\-.@%&*#~!?^+=<>|]+)` in `FieldNamedPreparedStatement#parseNamedStatement`. The character class covers most special characters, but it does not include whitespace.
   
   When a sink column name contains a space (some legacy databases do use such names, e.g. `MY COL`), the parser cuts the token at the space:
   
   ```
   INSERT INTO test (first_name, last_name) VALUES (:first name, :last name)
   ```
   
   `":first name"` is parsed as parameter `first` and the parsed SQL becomes `VALUES (? name, ? name)`, so statement creation either fails the parameter validation or produces a broken statement.
   
   Expected: when the schema field list is known (the sink always knows it), a field name containing characters outside the regex class should be matched as a whole-name placeholder.
   
   ### Impact
   
   JDBC sink jobs with custom `query`/upsert SQL and space-containing column names cannot run.


-- 
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: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Connector-V2][JDBC] Named parameters cannot resolve sink column names containing spaces [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #12520: [Bug][Connector-V2][JDBC] Named parameters cannot resolve sink column names containing spaces
URL: https://github.com/apache/seatunnel/issues/12520


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org