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

Function AppendBinaryBatch

cpp/src/arrow/adapters/orc/util.cc:229–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227
228template <class BuilderType>
229Status AppendBinaryBatch(liborc::ColumnVectorBatch* column_vector_batch, int64_t offset,
230 int64_t length, ArrayBuilder* abuilder) {
231 auto builder = checked_cast<BuilderType*>(abuilder);
232 auto batch = checked_cast<liborc::StringVectorBatch*>(column_vector_batch);
233
234 const bool has_nulls = batch->hasNulls;
235 for (int64_t i = offset; i < length + offset; i++) {
236 if (!has_nulls || batch->notNull[i]) {
237 RETURN_NOT_OK(
238 builder->Append(batch->data[i], static_cast<int32_t>(batch->length[i])));
239 } else {
240 RETURN_NOT_OK(builder->AppendNull());
241 }
242 }
243 return Status::OK();
244}
245
246Status AppendDecimalBatch(const liborc::Type* type,
247 liborc::ColumnVectorBatch* column_vector_batch, int64_t offset,

Callers

nothing calls this directly

Calls 3

OKFunction · 0.50
AppendMethod · 0.45
AppendNullMethod · 0.45

Tested by

no test coverage detected