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

Method SetData

cpp/src/parquet/decoder.cc:902–916  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

900 void SetDict(TypedDecoder<Type>* dictionary) override;
901
902 void SetData(int num_values, const uint8_t* data, int len) override {
903 this->num_values_ = num_values;
904 if (len == 0) {
905 // Initialize dummy decoder to avoid crashes later on
906 idx_decoder_ =
907 ::arrow::util::RleBitPackedDecoder<int32_t>(data, len, /*bit_width=*/1);
908 return;
909 }
910 uint8_t bit_width = *data;
911 if (ARROW_PREDICT_FALSE(bit_width > 32)) {
912 throw ParquetException("Invalid or corrupted bit_width " +
913 std::to_string(bit_width) + ". Maximum allowed is 32.");
914 }
915 idx_decoder_ = ::arrow::util::RleBitPackedDecoder<int32_t>(++data, --len, bit_width);
916 }
917
918 int Decode(T* buffer, int num_values) override {
919 num_values = std::min(num_values, this->num_values_);

Callers

nothing calls this directly

Calls 2

ParquetExceptionFunction · 0.85
to_stringFunction · 0.85

Tested by

no test coverage detected