| 2091 | using ArrayType = typename ::arrow::TypeTraits<ArrowType>::ArrayType; |
| 2092 | using ParquetCType = typename ParquetType::c_type; |
| 2093 | Status Serialize(const ArrayType& array, ArrowWriteContext*, ParquetCType* out) { |
| 2094 | const ArrowCType* input = array.raw_values(); |
| 2095 | if (array.null_count() > 0) { |
| 2096 | for (int64_t i = 0; i < array.length(); i++) { |
| 2097 | out[i] = static_cast<ParquetCType>(input[i]); |
| 2098 | } |
| 2099 | } else { |
| 2100 | std::copy(input, input + array.length(), out); |
| 2101 | } |
| 2102 | return Status::OK(); |
| 2103 | } |
| 2104 | }; |
| 2105 | |
| 2106 | template <typename ParquetType> |
no test coverage detected