rkavanap commented on a change in pull request #11016:
URL: https://github.com/apache/arrow/pull/11016#discussion_r743031788



##########
File path: cpp/src/gandiva/precompiled/string_ops.cc
##########
@@ -1851,8 +1881,10 @@ const char* rpad_utf8_int32_utf8(gdv_int64 context, 
const char* text, gdv_int32
   } else {
     // case (return_length > text_char_count)
     // case where it needs to copy "fill_text" on the string right
-    char* ret =
-        reinterpret_cast<gdv_binary>(gdv_fn_context_arena_malloc(context, 
return_length));
+    gdv_int32 return_char_length = evaluate_return_char_length(
+        text_len, text_char_count, return_length, fill_text, fill_text_len);
+    char* ret = reinterpret_cast<gdv_binary>(
+        gdv_fn_context_arena_malloc(context, return_char_length));

Review comment:
       same comment as above. Shouldn't the while loop in 1899 use 
return_char_length instead of return 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]


Reply via email to