projjal commented on a change in pull request #12440:
URL: https://github.com/apache/arrow/pull/12440#discussion_r820393508
##########
File path: cpp/src/gandiva/precompiled/string_ops.cc
##########
@@ -2207,6 +2213,12 @@ const char* right_utf8_int32(gdv_int64 context, const
char* text, gdv_int32 text
return "";
}
+ //case where right('abcdef', -6) -> "" and right('abcdef', -7) -> ""
+ if(number < 0 && abs(number) >= text_len) {
Review comment:
text_len for strings with multibyte characters will be number of bytes
rather than number of characters.. while `number` refers the character count
--
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]