Alvaro-Kothe commented on code in PR #49095:
URL: https://github.com/apache/arrow/pull/49095#discussion_r2750117362
##########
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:
Definitely it's better. I also took the liberty to store the pointer
comparison in an auxiliary variable in favor of readability.
--
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]