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

Function mem_compare

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

Source from the content-addressed store, hash-verified

59}
60
61FORCE_INLINE
62gdv_int32 mem_compare(const char* left, gdv_int32 left_len, const char* right,
63 gdv_int32 right_len) {
64 int min = left_len;
65 if (right_len < min) {
66 min = right_len;
67 }
68
69 int cmp_ret = memcmp(left, right, min);
70 if (cmp_ret != 0) {
71 return cmp_ret;
72 } else {
73 return left_len - right_len;
74 }
75}
76
77// Expand inner macro for all varlen types.
78#define VAR_LEN_OP_TYPES(INNER, NAME, OP) \

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68