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