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

Function concatOperator_utf8_utf8

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

Source from the content-addressed store, hash-verified

875}
876
877FORCE_INLINE
878const char* concatOperator_utf8_utf8(gdv_int64 context, const char* left,
879 gdv_int32 left_len, const char* right,
880 gdv_int32 right_len, gdv_int32* out_len) {
881 *out_len = left_len + right_len;
882 if (*out_len <= 0) {
883 *out_len = 0;
884 return "";
885 }
886 char* ret = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(context, *out_len));
887 if (ret == nullptr) {
888 gdv_fn_context_set_error_msg(context, "Could not allocate memory for output string");
889 *out_len = 0;
890 return "";
891 }
892 memcpy(ret, left, left_len);
893 memcpy(ret + left_len, right, right_len);
894 return ret;
895}
896
897FORCE_INLINE
898const 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