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

Method EndRow

cpp/src/parquet/stream_writer.cc:286–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284}
285
286void StreamWriter::EndRow() {
287 if (!file_writer_) {
288 throw ParquetException("StreamWriter not initialized");
289 }
290 if (static_cast<std::size_t>(column_index_) < nodes_.size()) {
291 throw ParquetException("Cannot end row with " + std::to_string(column_index_) +
292 " of " + std::to_string(nodes_.size()) + " columns written");
293 }
294 column_index_ = 0;
295 ++current_row_;
296
297 if (max_row_group_size_ > 0) {
298 if (row_group_size_ > max_row_group_size_) {
299 EndRowGroup();
300 }
301 // Initialize for each row with size already written
302 // (compressed + uncompressed).
303 row_group_size_ = row_group_writer_->total_bytes_written() +
304 row_group_writer_->total_compressed_bytes();
305 }
306}
307
308void StreamWriter::EndRowGroup() {
309 if (!file_writer_) {

Callers 1

stream_writer.ccFile · 0.45

Calls 5

ParquetExceptionFunction · 0.85
to_stringFunction · 0.85
sizeMethod · 0.45
total_bytes_writtenMethod · 0.45

Tested by

no test coverage detected