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

Function mem_compare

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

Source from the content-addressed store, hash-verified

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

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68