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

Method Diff

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

Source from the content-addressed store, hash-verified

514
515 public:
516 Result<std::shared_ptr<StructArray>> Diff() {
517 base_begin_ = 0;
518 base_end_ = base_.length();
519 target_begin_ = 0;
520 target_end_ = target_.length();
521 ARROW_ASSIGN_OR_RAISE(_comparator,
522 ValueComparatorFactory::Create(*base_.type(), base_, target_));
523
524 finish_index_ = -1;
525 edit_count_ = 0;
526 endpoint_base_ = {ExtendFrom({base_begin_, target_begin_}).base};
527 insert_ = {true};
528 if ((base_end_ - base_begin_ == target_end_ - target_begin_) &&
529 endpoint_base_[0] == base_end_) {
530 // trivial case: base == target
531 finish_index_ = 0;
532 }
533 while (!Done()) {
534 Next();
535 }
536 return GetEdits(pool_);
537 }
538
539 private:
540 // Constructor-injected references

Callers 1

DiffFunction · 0.45

Calls 4

ARROW_ASSIGN_OR_RAISEFunction · 0.50
NextFunction · 0.50
lengthMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected