| 967 | |
| 968 | template <typename DType> |
| 969 | void TypedStatisticsImpl<DType>::PlainDecode(const std::string& src, T* dst) const { |
| 970 | auto decoder = MakeTypedDecoder<DType>(Encoding::PLAIN, descr_); |
| 971 | decoder->SetData(1, reinterpret_cast<const uint8_t*>(src.c_str()), |
| 972 | static_cast<int>(src.size())); |
| 973 | int decoded_values = decoder->Decode(dst, 1); |
| 974 | if (decoded_values != 1) { |
| 975 | throw ParquetException("Failed to decode statistic value from plain encoded string"); |
| 976 | } |
| 977 | } |
| 978 | |
| 979 | template <> |
| 980 | void TypedStatisticsImpl<ByteArrayType>::PlainEncode(const T& src, |
nothing calls this directly
no test coverage detected