corgy-w opened a new pull request, #11994:
URL: https://github.com/apache/seatunnel/pull/11994
### Purpose of this pull request
`TableRenameTransform.convertCase()` and
`FieldRenameTransform.convertCase()` call `String.toUpperCase()` /
`String.toLowerCase()` without an explicit locale, so
`convert_case=UPPER/LOWER` depends on the default locale of the worker JVM.
Under the Turkish locale, `lower("I")` returns the dotless `ı` and `upper("i")`
returns `İ`, so a distributed job can produce different output depending on the
host.
This is the same class of bug as the SQL `lower()`/`upper()` functions
(#11949) — but those PRs only fixed `StringFunction`, leaving the rename
transforms affected.
The fix passes `Locale.ROOT` so case conversion is deterministic and follows
SQL semantics.
### Does this PR introduce _any_ user-facing change?
No behavioral change under non-Turkish-default locales; it only makes the
result locale independent.
### How was this patch tested?
- `./mvnw spotless:apply -pl seatunnel-transforms-v2`
- `TableRenameTransformTest` (2 tests) and `FieldRenameTransformTest` (3
tests) pass, including the new `testConvertCaseIsLocaleIndependent` regression
test which runs under the `tr-TR` locale.
--
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]