| 650 | // can-static-cast-to-same-type-introduce-runtime-overhead |
| 651 | template <class DataType, class BatchType> |
| 652 | Status 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 | |
| 666 | template <class DataType> |
| 667 | Status WriteTimestampBatch(const Array& array, int64_t orc_offset, |
nothing calls this directly
no test coverage detected