Skip to content

Commit 63c2be2

Browse files
committed
add comment for BufferedStats
1 parent 5d93274 commit 63c2be2

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

cpp/src/parquet/file_writer.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int64_t RowGroupWriter::total_compressed_bytes_written() const {
6969
return contents_->total_compressed_bytes_written();
7070
}
7171

72-
BufferedStats RowGroupWriter::estimated_buffered_stats() const {
72+
RowGroupWriter::BufferedStats RowGroupWriter::estimated_buffered_stats() const {
7373
return contents_->EstimatedBufferedStats();
7474
}
7575

@@ -202,8 +202,8 @@ class RowGroupSerializer : public RowGroupWriter::Contents {
202202
return total_compressed_bytes_written;
203203
}
204204

205-
BufferedStats EstimatedBufferedStats() const override {
206-
BufferedStats stats;
205+
RowGroupWriter::BufferedStats EstimatedBufferedStats() const override {
206+
RowGroupWriter::BufferedStats stats;
207207
if (closed_) {
208208
return stats;
209209
}

cpp/src/parquet/file_writer.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,17 @@ class ColumnWriter;
3434
static constexpr uint8_t kParquetMagic[4] = {'P', 'A', 'R', '1'};
3535
static constexpr uint8_t kParquetEMagic[4] = {'P', 'A', 'R', 'E'};
3636

37-
struct PARQUET_EXPORT BufferedStats {
38-
int64_t def_level_bytes = 0;
39-
int64_t rep_level_bytes = 0;
40-
int64_t value_bytes = 0;
41-
int64_t dict_bytes = 0;
42-
};
43-
4437
class PARQUET_EXPORT RowGroupWriter {
4538
public:
39+
// Estimated uncompressed byte sizes of data buffered by column writers
40+
// that have not yet been serialized into data pages.
41+
struct BufferedStats {
42+
int64_t def_level_bytes = 0;
43+
int64_t rep_level_bytes = 0;
44+
int64_t value_bytes = 0;
45+
int64_t dict_bytes = 0;
46+
};
47+
4648
// Forward declare a virtual class 'Contents' to aid dependency injection and more
4749
// easily create test fixtures
4850
// An implementation of the Contents class is defined in the .cc file

0 commit comments

Comments
 (0)