projjal commented on code in PR #12860:
URL: https://github.com/apache/arrow/pull/12860#discussion_r849005047


##########
cpp/src/gandiva/precompiled/string_ops.cc:
##########
@@ -1407,6 +1407,10 @@ FORCE_INLINE
 const char* convert_fromUTF8_binary(gdv_int64 context, const char* bin_in, 
gdv_int32 len,
                                     gdv_int32* out_len) {
   *out_len = len;
+  // handle empty string case

Review Comment:
   Here malloc and memcpy are not required. You can just return the original 
string slice. Also malloc returning nullptr for zero length in certain cases is 
also a bug. Can you create a separate PR to fix that.



-- 
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