SEPURI-SAI-KRISHNA opened a new issue, #12617:
URL: https://github.com/apache/seatunnel/issues/12617

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   ### What happened
   
   Eleven sites in `seatunnel-transforms-v2` convert case without a `Locale`, 
so they follow the worker's default locale. Under `tr-TR` the letter `i` does 
not round trip: `"if".toUpperCase()` is `"İF"` and `"GIF".toLowerCase()` is 
`"gıf"`. Same class as #12496, fixed for the `sql` subtree by #12495; these are 
the rest, in `calcite`, `nlpmodel` and `validator`.
   
   **Five are reachable today, each reproduced by a unit test that fails on 
`dev`:**
   
   | Site | Effect under `tr-TR` |
   | --- | --- |
   | `calcite/udf/VectorReduceFunction.java:60` | `VECTOR_REDUCE(vec, 2, 
'random_projection')` throws `Unknown reduction method`. The upper-casing 
exists precisely so a lower-case method resolves. |
   | `.../multimodal/ModalityType.java:78` | A URL ending `.GIF`, `.TIF`, 
`.AVI`, `.ICO`, `.DIB` or `.SGI` is not detected and falls back to `TEXT`, so 
an image is embedded as text. |
   | `ModalityType.java:102` | `supportsExtension("TIF")` and `("AVI")` return 
`false`. |
   | `.../remote/doubao/DoubaoModel.java:388` | The payload goes out as 
`data:ımage/png;base64,...`. `ModalityGroup.IMAGE` is a shipped constant, so no 
unusual input is needed. |
   | `nlpmodel/ModelInvocationCacheKey.java:144` | Tokens are lower-cased so 
equivalent spellings collapse to one key; `provider=openaı`, `modality=ımage`, 
`format=bınary` break that. |
   
   **Six are the same pattern, not reachable today:** 
`BuiltinFunctions.java:54` (none of the 12 shipped UDF names are altered), 
`ModalityType.java:60` and `PayloadFormat.java:40` (both feed 
`equalsIgnoreCase`, which still matches), and 
`DataValidatorTransformConfig.java:168`/`:336` with `AbstractModel.java:123` 
(their tokens carry no `i`). Each is one `UNIQUE` or `IN_LIST` label away from 
breaking.
   
   ### SeaTunnel Version
   
   dev
   
   ### What you expected to happen
   
   Case conversion used for matching should not depend on the worker's default 
locale. The same job should behave identically on every worker.
   
   ### Context
   
   Reproduced on JDK 11 with 
`Locale.setDefault(Locale.forLanguageTag("tr-TR"))`. Reverting the fix fails 
four new tests in `CalciteSQLEngineTest`, `DoubaoMultimodalModelTest` and 
`ModelInvocationCacheKeyTest`, covering all five reachable sites.
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR.
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/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