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

Function WriteGenericBatch

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

Source from the content-addressed store, hash-verified

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