MCPcopy Create free account
hub / github.com/apache/impala / DecodeValue

Method DecodeValue

be/src/exec/parquet/parquet-bool-decoder.h:75–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74template <parquet::Encoding::type ENCODING>
75inline bool ParquetBoolDecoder::DecodeValue(bool* RESTRICT value) RESTRICT {
76 DCHECK_EQ(ENCODING, encoding_);
77 if (LIKELY(unpacked_value_idx_ < num_unpacked_values_)) {
78 *value = unpacked_values_[unpacked_value_idx_++];
79 } else {
80 // Unpack as many values as we can into the buffer. We expect to read at least one
81 // value.
82 if (ENCODING == parquet::Encoding::PLAIN) {
83 num_unpacked_values_ =
84 bool_values_.UnpackBatch(1, UNPACKED_BUFFER_LEN, &unpacked_values_[0]);
85 } else {
86 num_unpacked_values_ =
87 rle_decoder_.GetValues(UNPACKED_BUFFER_LEN, &unpacked_values_[0]);
88 }
89
90 if (UNLIKELY(num_unpacked_values_ == 0)) {
91 return false;
92 }
93 *value = unpacked_values_[0];
94 unpacked_value_idx_ = 1;
95 }
96 return true;
97}
98} // namespace impala

Callers

nothing calls this directly

Calls 2

UnpackBatchMethod · 0.80
GetValuesMethod · 0.80

Tested by

no test coverage detected