SEPURI-SAI-KRISHNA commented on PR #12976:
URL: https://github.com/apache/seatunnel/pull/12976#issuecomment-6410956453

   @DanielLeens both carryover findings are real. I ran them on JDK 17 rather 
than take them on source reading, and both are fixed at `70dcb475d`.
   
   **Issue 2, confirmed.** `WeekFields.of(locale)` gives SUNDAY/1 for `en-US` 
and `Locale.ENGLISH`, MONDAY/4 for `en-GB` and `de-DE`, MONDAY/1 for `tr-TR`. 
Measured for `2021-01-01`, a Friday:
   
   | pattern | en-US | en-GB | de-DE | tr-TR | now |
   | --- | --- | --- | --- | --- | --- |
   | `YYYY` | 2021 | 2020 | 2020 | 2021 | 2021 |
   | `ww` | 01 | 53 | 53 | 01 | 01 |
   | `W` | 1 | 0 | 0 | 1 | 1 |
   | `e` | 6 | 5 | 5 | 5 | 6 |
   
   So the "digits and separators are unaffected" line was wrong, and `en-GB` 
proves your point about English regional defaults. Both upgrade notes now split 
Impact into text, localised week fields and unaffected, carry that table, and 
tell anyone who keyed rows on `Y w W e c` to compute the week upstream. Both 
function pages got the same note. New regression 
`testFormatDateTimeWeekFieldsUseEnglishWeekRulesUnderAnyDefaultLocale` runs the 
real `SQLTransform` under ENGLISH, `en-GB`, `de-DE` and `tr-TR` with a 
day-of-year control. It is a unit test, not an addition to 
`func_datetime.conf`, because the E2E container runs one fixed default locale 
and so cannot express "same output under four different worker defaults".
   
   I also checked the `ZetaDateTimeFormat` claim instead of repeating it: all 
13 constants are `y M d H m s S` plus literals.
   
   **Issue 3, confirmed.** With a fixture whose categories differ from the base:
   
   ```text
   fixture                       base=en_US FORMAT=de_DE DISPLAY=fr_FR
   old cleanup, base only     -> base=en_US FORMAT=en_US DISPLAY=en_US
   new cleanup, all three     -> base=en_US FORMAT=de_DE DISPLAY=fr_FR
   ```
   
   Added `snapshotDefaultLocales` and `restoreDefaultLocales` and moved both 
existing locale tests onto them, taking the full snapshot rather than the 
FORMAT-only variant. The order is commented: restore the base first, because 
setting it clobbers both categories.
   
   **Validation here.** `spotless:check` clean, `seatunnel-transforms-v2` 1492 
tests, 0 failures. Mutation check: reverting both `ofPattern(format, 
Locale.ENGLISH)` sites fails 3 tests, the new one on `en-GB` with `expected: 
<2021> but was: <2020>`.
   
   One caveat I would rather state than leave implied: that mutation run stops 
at the first failed assertion, so the newly added era, quarter and am/pm 
assertions are evidenced by direct measurement of each pattern under `tr-TR`, 
`ja-JP` and `de-DE`, not by the mutation run itself.
   


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