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

Function PrintNext

cpp/src/parquet/column_scanner.h:171–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169 }
170
171 virtual void PrintNext(std::ostream& out, int width, bool with_levels = false) {
172 T val{};
173 int16_t def_level = -1;
174 int16_t rep_level = -1;
175 bool is_null = false;
176 char buffer[80];
177
178 if (!Next(&val, &def_level, &rep_level, &is_null)) {
179 throw ParquetException("No more values buffered");
180 }
181
182 if (with_levels) {
183 out << " D:" << def_level << " R:" << rep_level << " ";
184 if (!is_null) {
185 out << "V:";
186 }
187 }
188
189 if (is_null) {
190 std::string null_fmt = format_fwf<ByteArrayType>(width);
191 snprintf(buffer, sizeof(buffer), null_fmt.c_str(), "NULL");
192 } else {
193 FormatValue(&val, buffer, sizeof(buffer), width);
194 }
195 out << buffer;
196 }
197
198 private:
199 // The ownership of this object is expressed through the reader_ variable in the base

Callers

nothing calls this directly

Calls 3

ParquetExceptionFunction · 0.85
FormatValueFunction · 0.85
NextFunction · 0.70

Tested by

no test coverage detected