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

Method Process

cpp/src/arrow/util/delimiting.cc:109–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 : boundary_finder_(delimiter) {}
108
109Status Chunker::Process(std::shared_ptr<Buffer> block, std::shared_ptr<Buffer>* whole,
110 std::shared_ptr<Buffer>* partial) {
111 int64_t last_pos = -1;
112 RETURN_NOT_OK(boundary_finder_->FindLast(std::string_view(*block), &last_pos));
113 if (last_pos == BoundaryFinder::kNoDelimiterFound) {
114 // No delimiter found
115 *whole = SliceBuffer(block, 0, 0);
116 *partial = block;
117 return Status::OK();
118 } else {
119 *whole = SliceBuffer(block, 0, last_pos);
120 *partial = SliceBuffer(block, last_pos);
121 }
122 return Status::OK();
123}
124
125Status Chunker::ProcessWithPartial(std::shared_ptr<Buffer> partial,
126 std::shared_ptr<Buffer> block,

Callers

nothing calls this directly

Calls 3

SliceBufferFunction · 0.85
OKFunction · 0.50
FindLastMethod · 0.45

Tested by

no test coverage detected