projjal commented on code in PR #12860:
URL: https://github.com/apache/arrow/pull/12860#discussion_r850064553
##########
cpp/src/gandiva/precompiled/string_ops.cc:
##########
@@ -1406,15 +1406,13 @@ const char* chr_int64(gdv_int64 context, gdv_int64 in,
gdv_int32* out_len) {
FORCE_INLINE
const char* convert_fromUTF8_binary(gdv_int64 context, const char* bin_in,
gdv_int32 len,
gdv_int32* out_len) {
- *out_len = len;
- char* ret = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(context,
*out_len));
- if (ret == nullptr) {
- gdv_fn_context_set_error_msg(context, "Could not allocate memory for
output string");
+ if (len < 0) {
Review Comment:
This check is not required, len will always be >= 0.
--
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]