dayan02dev opened a new pull request, #12491:
URL: https://github.com/apache/arrow-rs/pull/12491

   # Which issue does this PR close?
   
   - Closes #7208
   
   # Rationale for this change
   
   `string_to_datetime` only accepts a four-digit `YYYY-MM-DD` date, so ISO 
8601 timestamps with a signed year such as `+10999-12-31T00:00:00` or 
`-0001-01-01T00:00:00` fail with "error parsing date". Safe casts turn them 
into null, and arrow-json and arrow-csv can't read back the timestamps their 
own writers print for years outside 0000-9999. Date parsing already accepts 
this form through `parse_extended_ymd` (#7074).
   
   # What changes are included in this PR?
   
   When the string starts with `+` or `-`, the date is parsed with 
`parse_extended_ymd` and the extra year bytes are skipped, so the existing time 
and timezone parsing runs at its usual offsets. Other input only gains a 
first-byte check: the `parse_timestamp` inputs stayed within about 3% locally, 
with no change on the cast kernel.
   
   # Are these changes tested?
   
   Yes, new and extended tests in `arrow-cast/src/parse.rs`, including `Date64` 
strings longer than 10 characters.
   
   # Are there any significant user-facing changes?
   
   No API changes. Timestamps with a signed extended year now parse instead of 
returning an error or null.
   
   # AI usage disclosure
   
   Written with help from Claude Code. I read the full diff.
   


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