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

Method Decode

cpp/src/parquet/column_reader.cc:190–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190int LevelDecoder::Decode(int batch_size, int16_t* levels) {
191 const int num_values = std::min(num_values_remaining_, batch_size);
192 const int num_decoded = impl_->GetBatch(levels, num_values);
193 if (num_decoded > 0) {
194 internal::MinMax min_max = internal::FindMinMax(levels, num_decoded);
195 if (ARROW_PREDICT_FALSE(min_max.min < 0 || min_max.max > max_level_)) {
196 std::stringstream ss;
197 ss << "Malformed levels. min: " << min_max.min << " max: " << min_max.max
198 << " out of range. Max Level: " << max_level_;
199 throw ParquetException(ss.str());
200 }
201 }
202 num_values_remaining_ -= num_decoded;
203 return num_decoded;
204}
205
206int LevelDecoder::Skip(int batch_size) {
207 const int num_values = std::min(num_values_remaining_, batch_size);

Callers 5

SkipMethod · 0.45
ReadValuesMethod · 0.45
ReadDefinitionLevelsMethod · 0.45
ReadRepetitionLevelsMethod · 0.45
ReadValuesDenseMethod · 0.45

Calls 4

FindMinMaxFunction · 0.85
ParquetExceptionFunction · 0.85
strMethod · 0.80
GetBatchMethod · 0.45

Tested by

no test coverage detected