wmalpica commented on a change in pull request #11064:
URL: https://github.com/apache/arrow/pull/11064#discussion_r704551768
##########
File path: cpp/src/arrow/util/value_parsing.h
##########
@@ -281,6 +371,19 @@ struct StringToUnsignedIntConverterMixin {
if (ARROW_PREDICT_FALSE(length == 0)) {
return false;
}
+ // If its starts with 0x then its hex
+ if (*s == '0' && *(s + 1) == 'x'){
+ length -= 2;
+ s += 2;
+ // lets make sure that the length of the string is not too big
Review comment:
I opted not to do this, since length is used both at
StringToSignedIntConverterMixin and at ParseHex. Getting rid of length would
then involve keeping track of the original pointer of `s` and the new pointer
and comparing that to the original length. It seems more convoluted
--
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]