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

Function NextValue

cpp/src/parquet/column_scanner.h:146–169  ·  view source on GitHub ↗

Returns true if there is a next value

Source from the content-addressed store, hash-verified

144
145 // Returns true if there is a next value
146 bool NextValue(T* val, bool* is_null) {
147 if (level_offset_ == levels_buffered_) {
148 if (!HasNext()) {
149 // Out of data pages
150 return false;
151 }
152 }
153
154 // Out of values
155 int16_t def_level = -1;
156 int16_t rep_level = -1;
157 NextLevels(&def_level, &rep_level);
158 *is_null = def_level < descr()->max_definition_level();
159
160 if (*is_null) {
161 return true;
162 }
163
164 if (value_offset_ == values_buffered_) {
165 throw ParquetException("Value was non-null, but has not been buffered");
166 }
167 *val = values_[value_offset_++];
168 return true;
169 }
170
171 virtual void PrintNext(std::ostream& out, int width, bool with_levels = false) {
172 T val{};

Callers

nothing calls this directly

Calls 4

HasNextFunction · 0.85
NextLevelsFunction · 0.85
descrFunction · 0.85
ParquetExceptionFunction · 0.85

Tested by

no test coverage detected