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

Function Decode

cpp/src/parquet/page_index.cc:42–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41template <typename DType>
42void Decode(std::unique_ptr<typename EncodingTraits<DType>::Decoder>& decoder,
43 const std::string& input, std::vector<typename DType::c_type>* output,
44 size_t output_index) {
45 if (ARROW_PREDICT_FALSE(output_index >= output->size())) {
46 throw ParquetException("Index out of bound");
47 }
48
49 decoder->SetData(/*num_values=*/1, reinterpret_cast<const uint8_t*>(input.c_str()),
50 static_cast<int>(input.size()));
51 const auto num_values = decoder->Decode(&output->at(output_index), /*max_values=*/1);
52 if (ARROW_PREDICT_FALSE(num_values != 1)) {
53 throw ParquetException("Could not decode statistics value");
54 }
55}
56
57template <>
58void Decode<BooleanType>(std::unique_ptr<BooleanDecoder>& decoder,

Callers 3

DecodeArrowDenseMethod · 0.70
FuzzMethod · 0.50
GeoStatisticsMethod · 0.50

Calls 4

ParquetExceptionFunction · 0.85
sizeMethod · 0.45
SetDataMethod · 0.45
DecodeMethod · 0.45

Tested by

no test coverage detected