WillAyd commented on code in PR #49095:
URL: https://github.com/apache/arrow/pull/49095#discussion_r2750012822
##########
cpp/src/arrow/util/value_parsing.cc:
##########
@@ -35,15 +35,17 @@ bool StringToFloat(const char* s, size_t length, char
decimal_point, float* out)
::arrow_vendored::fast_float::chars_format::general, decimal_point};
const auto res =
::arrow_vendored::fast_float::from_chars_advanced(s, s + length, *out,
options);
- return res.ec == std::errc() && res.ptr == s + length;
+ return (res.ec == std::errc() || res.ec == std::errc::result_out_of_range) &&
Review Comment:
Nit on readability - I think it would help to break up this line. Something
like:
```cpp
const auto is_allowed_ec = res.ec == std::errc() || res.ec ==
std::errc::result_out_of_range;
return is_allowed_ec && res.ptr = s + length;
```
--
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]