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

Method Close

cpp/src/arrow/acero/exec_plan.cc:1067–1084  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1065 }
1066
1067 Status Close() override {
1068 if (!iterator_) {
1069 // Already closed
1070 return Status::OK();
1071 }
1072 // End plan and read from generator until finished
1073 plan_->StopProducing();
1074 std::shared_ptr<RecordBatch> batch;
1075 do {
1076 Status st = ReadNext(&batch);
1077 if (!st.ok()) {
1078 if (st.IsCancelled()) break; // plan cancelled, so closing is done
1079 return st;
1080 }
1081 } while (batch != nullptr);
1082 iterator_.reset();
1083 return Status::OK();
1084 }
1085
1086 std::shared_ptr<ExecPlan> plan_;
1087 std::shared_ptr<Schema> schema_;

Callers

nothing calls this directly

Calls 6

ReadNextFunction · 0.85
IsCancelledMethod · 0.80
OKFunction · 0.50
StopProducingMethod · 0.45
okMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected