jpedroantunes commented on a change in pull request #9844:
URL: https://github.com/apache/arrow/pull/9844#discussion_r604220433
##########
File path: cpp/src/gandiva/precompiled/string_ops.cc
##########
@@ -1246,6 +1246,33 @@ const char* convert_fromUTF8_binary(gdv_int64 context,
const char* bin_in, gdv_i
return ret;
}
+FORCE_INLINE
+const char* convert_replace_invalid_fromUTF8_binary(
+ gdv_int64 context, const char* text_in, gdv_int32 text_len,
+ const char* char_to_replace, gdv_int32 /*char_to_replace_len*/, gdv_int32*
out_len) {
+ *out_len = text_len;
Review comment:
Actually we are going to consider a single char to replace.
##########
File path: cpp/src/gandiva/precompiled/string_ops.cc
##########
@@ -1246,6 +1246,33 @@ const char* convert_fromUTF8_binary(gdv_int64 context,
const char* bin_in, gdv_i
return ret;
}
+FORCE_INLINE
+const char* convert_replace_invalid_fromUTF8_binary(
+ gdv_int64 context, const char* text_in, gdv_int32 text_len,
+ const char* char_to_replace, gdv_int32 /*char_to_replace_len*/, gdv_int32*
out_len) {
+ *out_len = text_len;
+ char* ret = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(context,
*out_len));
Review comment:
Actually we are going to consider a single char to replace. So the input
length will necessarily be equals to the output 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.
For queries about this service, please contact Infrastructure at:
[email protected]