Returns true if there is a next value
| 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{}; |
nothing calls this directly
no test coverage detected