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

Function AllTypesAreIdenticalFrom

cpp/src/arrow/compute/kernel.cc:522–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520}
521
522std::shared_ptr<MatchConstraint> AllTypesAreIdenticalFrom(size_t first_type_index) {
523 return MatchConstraint::Make(
524 [first_type_index](const std::vector<TypeHolder>& types) -> bool {
525 DCHECK_LT(first_type_index, types.size());
526 return std::all_of(types.begin() + first_type_index + 1, types.end(),
527 [&types, first_type_index](const TypeHolder& type) {
528 return type == types[first_type_index];
529 });
530 });
531}
532
533std::shared_ptr<MatchConstraint> AllTypesAreIdentical() {
534 static auto instance = AllTypesAreIdenticalFrom(/*first_type_index=*/0);

Callers 3

TESTFunction · 0.85
AllTypesAreIdenticalFunction · 0.85
RegisterScalarIfElseFunction · 0.85

Calls 4

MakeFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by 1

TESTFunction · 0.68