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

   ### Search before asking
   
   - [x] I searched existing issues and pull requests for the same problem.
   
   ### What happened
   
   The DuckDB type converter and hash-partition expression use `String.format` 
with the JVM default locale. With `ar-EG`, a DECIMAL(10,2) definition becomes 
`DECIMAL(١٠,٢)` and a hash modulus of 16 becomes `١٦`. DuckDB expects ASCII 
digits in these SQL expressions.
   
   Expected: `DECIMAL(10,2)` and `MOD(ABS(HASH("id")), 16)` regardless of the 
JVM locale.
   
   Reproduce by setting `Locale.setDefault(Locale.forLanguageTag("ar-EG"))`, 
reconverting a `PhysicalColumn` with `new DecimalType(10, 2)`, and calling `new 
DuckDBDialect().hashModForField("id", 16)`. Restore the locale afterward. The 
generated SQL is also exercised with the pinned DuckDB JDBC driver in the 
regression tests.
   
   ### SeaTunnel Version
   
   Current dev at `4c4fd615d677695b619ca0e04fcfd82e104cd4a9`.
   
   ### SeaTunnel Config
   
   Not configuration-dependent; the reproduction above uses the affected Java 
API directly.
   
   ### Running Command
   
   Run the API reproduction above on JDK 8 or 17.
   
   ### Error Exception
   
   Generated SQL contains localized digits and fails SQL 
syntax/ASCII-expression assertions.
   
   ### Java or Scala Version
   
   Reproduced on JDK 8 and 17.
   
   ### Are you willing to submit PR?
   
   - [x] Yes
   
   ### Code of Conduct
   
   - [x] I agree to follow the project Code of Conduct.
   


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