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

Method Make

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

Source from the content-addressed store, hash-verified

479// MatchConstraint
480
481std::shared_ptr<MatchConstraint> MatchConstraint::Make(
482 std::function<bool(const std::vector<TypeHolder>&)> matches) {
483 class FunctionMatchConstraint : public MatchConstraint {
484 public:
485 explicit FunctionMatchConstraint(
486 std::function<bool(const std::vector<TypeHolder>&)> matches)
487 : matches_(std::move(matches)) {}
488
489 bool Matches(const std::vector<TypeHolder>& types) const override {
490 return matches_(types);
491 }
492
493 private:
494 std::function<bool(const std::vector<TypeHolder>&)> matches_;
495 };
496
497 return std::make_shared<FunctionMatchConstraint>(std::move(matches));
498}
499
500std::shared_ptr<MatchConstraint> DecimalsHaveSameScale() {
501 class DecimalsHaveSameScaleConstraint : public MatchConstraint {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected