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

   # Which issue does this PR close?
   
   Closes #11225.
   
   # Rationale for this change
   
   Integer and floating-point (numeric) parsers already accept surrounding 
ASCII whitespace but the current temporal parsers do not. Expected behaviour in 
a lot of other dbms's is to just parse the temporal values surrounded with 
ASCII whitespace normally. And for this crate to handle ASCII whitespace for 
some dtypes, but not for others, seems counter-intuitive.
   
   # What changes are included in this PR?
   
   Temporal parsers now retry parsing after trimming surrounding ASCII 
whitespace if parsing the original input failed. This preserves the existing 
fast path for **correct** (non-padded) values.
   
   # Are these changes tested?
   
   New tests added to arrow-cast/src/parse.rs, and regression test added 
arrow-cast/src/cast/mod.rs.
   
   All tests (and clippy) pass.
   
   `cargo test -p arrow-cast`
   
   # Are there any user-facing changes?
   
   <!--
   If there are user-facing changes then we may require documentation to be 
updated before approving the PR.
   
   If there are any breaking changes to public APIs, please call them out.
   -->
   
   Yes, string casts to temporal types no handle surrounding ASCII whitespace, 
no API changes but behavioural changes that might need changes to docs.
   


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