MCPcopy Create free account
hub / github.com/apache/impala / Compare

Method Compare

be/src/runtime/string-value.inline.h:47–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47inline int StringValue::Compare(const StringValue& other) const {
48 SimpleString this_s = ToSimpleString();
49 SimpleString other_s = other.ToSimpleString();
50 int l = std::min(this_s.len, other_s.len);
51 if (l == 0) {
52 if (this_s.len == other_s.len) {
53 return 0;
54 } else if (this_s.len == 0) {
55 return -1;
56 } else {
57 DCHECK_EQ(other_s.len, 0);
58 return 1;
59 }
60 }
61 return StringCompare(this_s.ptr, this_s.len, other_s.ptr, other_s.len, l);
62}
63
64inline bool StringValue::Eq(const StringValue& other) const {
65 SimpleString this_s = ToSimpleString();

Callers

nothing calls this directly

Calls 3

minFunction · 0.85
StringCompareFunction · 0.70
ToSimpleStringMethod · 0.45

Tested by

no test coverage detected