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

Function WriteGenericBatch

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

Source from the content-addressed store, hash-verified

652// can-static-cast-to-same-type-introduce-runtime-overhead
653template <class DataType, class BatchType>
654Status WriteGenericBatch(const Array& array, int64_t orc_offset,
655 liborc::ColumnVectorBatch* column_vector_batch) {
656 using ArrayType = typename TypeTraits<DataType>::ArrayType;
657 const ArrayType& array_(checked_cast<const ArrayType&>(array));
658 auto batch = checked_cast<BatchType*>(column_vector_batch);
659 if (array.null_count()) {
660 batch->hasNulls = true;
661 }
662 Appender<DataType, BatchType> appender{array_, batch, orc_offset, 0};
663 ArraySpanVisitor<DataType> visitor;
664 RETURN_NOT_OK(visitor.Visit(*array_.data(), &appender));
665 return Status::OK();
666}
667
668template <class DataType>
669Status WriteTimestampBatch(const Array& array, int64_t orc_offset,

Callers

nothing calls this directly

Calls 4

OKFunction · 0.50
null_countMethod · 0.45
VisitMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected