MCPcopy Create free account
hub / github.com/apache/arrow / concatOperator_utf8_utf8

Function concatOperator_utf8_utf8

cpp/src/gandiva/precompiled/string_ops.cc:902–920  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

900}
901
902FORCE_INLINE
903const char* concatOperator_utf8_utf8(gdv_int64 context, const char* left,
904 gdv_int32 left_len, const char* right,
905 gdv_int32 right_len, gdv_int32* out_len) {
906 *out_len = left_len + right_len;
907 if (*out_len <= 0) {
908 *out_len = 0;
909 return "";
910 }
911 char* ret = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(context, *out_len));
912 if (ret == nullptr) {
913 gdv_fn_context_set_error_msg(context, "Could not allocate memory for output string");
914 *out_len = 0;
915 return "";
916 }
917 memcpy(ret, left, left_len);
918 memcpy(ret + left_len, right, right_len);
919 return ret;
920}
921
922FORCE_INLINE
923const char* concat_utf8_utf8_utf8(gdv_int64 context, const char* in1, gdv_int32 in1_len,

Callers 2

concat_utf8_utf8Function · 0.85
TESTFunction · 0.85

Calls 2

Tested by 1

TESTFunction · 0.68