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

   Fixes #11949
   
   ### Purpose of this pull request
   
   This change makes the SQL transform `lower()` and `upper()` functions 
deterministic across worker machines by using `Locale.ROOT` instead of the JVM 
default locale. Under a Turkish default locale, the previous implementation 
converted `I` to `ı` and `i` to `İ`, which could make identical jobs produce 
different results on different workers.
   
   The implementation is limited to `StringFunction.lower()` and 
`StringFunction.upper()` and preserves existing null behavior.
   
   ### Does this PR introduce any user-facing change?
   
   Yes. SQL case conversion is now locale-independent. For example, with the 
JVM default locale set to `tr-TR`:
   
   ```text
   Before: lower("I") = "ı", upper("i") = "İ"
   After:  lower("I") = "i", upper("i") = "I"
   ```
   
   This is a correctness fix for deterministic SQL transformations and does not 
require configuration changes or a migration.
   
   ### How was this patch tested?
   
   A regression test was added to `StringFunctionTest` that temporarily sets 
the default locale to Turkish, verifies the expected `lower()` and `upper()` 
results, and restores the original locale in a `finally` block.
   
   Verification completed locally:
   
   - `StringFunctionTest`: 34 tests passed, 0 failures, 0 errors.
   - SeaTunnel transforms module verification lifecycle: passed.
   - SeaTunnel Spotless formatting/check: passed.
   - Direct pre-fix harness reproduced `lower=ı upper=İ`.
   - Direct post-fix harness passed with `lower=i upper=I`.
   - `git diff --check`: passed.
   
   The repository-wide `./mvnw -q -DskipTests verify` and `./mvnw test` 
commands were also attempted. They are blocked by existing 
repository/environment issues in the config-shade module and frontend build; 
the changed transforms module and its complete `StringFunctionTest` pass 
independently.


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