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

   ### Purpose of this pull request
   
   DateUtils.matchDateFormatter accepts ISO local datetime text with a 
fractional second and optional Z, but its corresponding formatter puts the 
fraction and Z in the same optional block. A value such as 
2024-12-16T15:33:45.123 matches the pattern and then fails to parse. This also 
affects DATE fields parsed from CSV/Text through DateUtils.
   
   Make fractional seconds and the trailing Z independent optional sections. 
Preserve the existing regex, date extraction and unsupported-input behavior; 
test 0/3/6/9 fractional digits with and without Z and assert nanoseconds.
   
   Fixes #12667.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, on dev. For CSV/Text DATE fields, matching ISO datetime text now parses 
without requiring Z when fractional seconds are present. The date part is 
returned. No timezone-offset or new pattern support is added.
   
   English and Chinese connector documentation are updated.
   
   ### How was this patch tested?
   
   JDK 17: DateUtilsTest, 6 tests passed after the fix. Against the original 
formatter, the same suite produced 1 error (fractional local datetime without 
Z). Root build validation is still running; this PR is a draft until that 
result is recorded.
   
   ```shell
   ./mvnw -q spotless:apply
   ./mvnw -q -pl seatunnel-common -am -Dtest=DateUtilsTest 
-Dsurefire.failIfNoSpecifiedTests=false package
   ```
   
   ### Check list
   
   - [x] Added regression tests.
   - [x] Updated English and Chinese documentation.
   - [x] Existing connector integration coverage updated where applicable.
   
   No new connector, dependency or binary package.
   
   AI assistance: DeepSeek performed implementation and initial review; Codex 
coordinated final review, validation and submission.
   


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