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

Method RunLengthOfEqualsFrom

cpp/src/arrow/array/diff.cc:132–144  ·  view source on GitHub ↗

\brief Return the run length of equal values starting at the given indices in the base and target arrays. \param base_index The starting index in the base array. \param base_length The length of the base array. \param target_index The starting index in the target array. \param target_length The length of the target array. \return The run length of equal values starting at the given indices in the

Source from the content-addressed store, hash-verified

130 /// \return The run length of equal values starting at the given indices in the base
131 /// and target arrays.
132 virtual int64_t RunLengthOfEqualsFrom(int64_t base_index, int64_t base_length,
133 int64_t target_index, int64_t target_length) {
134 int64_t run_length_of_equals = 0;
135 while (base_index < base_length && target_index < target_length) {
136 if (!Equals(base_index, target_index)) {
137 break;
138 }
139 base_index += 1;
140 target_index += 1;
141 run_length_of_equals += 1;
142 }
143 return run_length_of_equals;
144 }
145};
146
147template <typename ArrayType>

Callers 1

ExtendFromMethod · 0.45

Calls 1

EqualsFunction · 0.70

Tested by

no test coverage detected