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

   ## What does this PR do?
   
   Fix a shared JSON timestamp parsing bug that can break CI tests when the 
same field mixes second-only and fractional-second values across rows.
   
   The root cause is `JsonToRowConverters` caching the first matched 
`DateTimeFormatter` per field name. If the first row is `2022-09-24T22:45:00` 
and a later row is `2022-09-24T22:45:00.123`, the cached formatter no longer 
matches and parsing fails.
   
   This PR refreshes the formatter when the cached formatter cannot parse the 
current timestamp text, and adds a regression test that deserializes both 
precisions through the same schema instance.
   
   ## Why is this needed?
   
   This is intended to address the shared CI failure seen from 
`VictoriaMetricsIT`, where `FakeSource` emits mixed timestamp text precision 
and the downstream JSON row conversion fails on later rows.
   
   ## Verification
   
   - `./mvnw spotless:apply`
   - `./mvnw -pl seatunnel-formats/seatunnel-format-json 
-Dtest=JsonRowDataSerDeSchemaTest test`
   - Started closest-to-CI verification:
     - `./mvnw -pl 
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-prometheus-e2e -am 
-DskipUT=true -DskipIT=false -DfailIfNoTests=false 
-Dsurefire.failIfNoSpecifiedTests=false -Dit.test=VictoriaMetricsIT verify`
     - still running locally when this draft was opened, so not claimed as 
passed yet
   


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