MCPcopy Create free account
hub / github.com/apache/arrow / operator()

Method operator()

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

Source from the content-addressed store, hash-verified

908 : os_(os), formatter_(std::move(formatter)) {}
909
910 Status operator()(int64_t delete_begin, int64_t delete_end, int64_t insert_begin,
911 int64_t insert_end) {
912 *os_ << "@@ -" << delete_begin << ", +" << insert_begin << " @@" << std::endl;
913
914 for (int64_t i = delete_begin; i < delete_end; ++i) {
915 *os_ << "-";
916 if (base_->IsValid(i)) {
917 formatter_(*base_, i, &*os_);
918 } else {
919 *os_ << "null";
920 }
921 *os_ << std::endl;
922 }
923
924 for (int64_t i = insert_begin; i < insert_end; ++i) {
925 *os_ << "+";
926 if (target_->IsValid(i)) {
927 formatter_(*target_, i, &*os_);
928 } else {
929 *os_ << "null";
930 }
931 *os_ << std::endl;
932 }
933
934 return Status::OK();
935 }
936
937 Status operator()(const Array& edits, const Array& base, const Array& target) {
938 if (edits.length() == 1) {

Callers

nothing calls this directly

Calls 4

VisitEditScriptFunction · 0.85
OKFunction · 0.50
IsValidMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected