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

Function AppendListBatch

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

Source from the content-addressed store, hash-verified

82}
83
84Status AppendListBatch(const liborc::Type* type,
85 liborc::ColumnVectorBatch* column_vector_batch, int64_t offset,
86 int64_t length, ArrayBuilder* abuilder) {
87 auto builder = checked_cast<ListBuilder*>(abuilder);
88 auto batch = checked_cast<liborc::ListVectorBatch*>(column_vector_batch);
89 liborc::ColumnVectorBatch* elements = batch->elements.get();
90 const liborc::Type* elemtype = type->getSubtype(0);
91
92 const bool has_nulls = batch->hasNulls;
93 for (int64_t i = offset; i < length + offset; i++) {
94 if (!has_nulls || batch->notNull[i]) {
95 int64_t start = batch->offsets[i];
96 int64_t end = batch->offsets[i + 1];
97 RETURN_NOT_OK(builder->Append());
98 RETURN_NOT_OK(
99 AppendBatch(elemtype, elements, start, end - start, builder->value_builder()));
100 } else {
101 RETURN_NOT_OK(builder->AppendNull());
102 }
103 }
104 return Status::OK();
105}
106
107Status AppendMapBatch(const liborc::Type* type,
108 liborc::ColumnVectorBatch* column_vector_batch, int64_t offset,

Callers 1

AppendBatchFunction · 0.85

Calls 6

AppendBatchFunction · 0.85
OKFunction · 0.50
getMethod · 0.45
AppendMethod · 0.45
value_builderMethod · 0.45
AppendNullMethod · 0.45

Tested by

no test coverage detected