Skip to content

Commit 6313725

Browse files
committed
add comment for BufferedStats
1 parent dfd872a commit 6313725

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
@@ -68,7 +68,7 @@ int64_t RowGroupWriter::total_compressed_bytes_written() const {
6868
return contents_->total_compressed_bytes_written();
6969
}
7070

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

@@ -199,8 +199,8 @@ class RowGroupSerializer : public RowGroupWriter::Contents {
199199
return total_compressed_bytes_written;
200200
}
201201

202-
BufferedStats EstimatedBufferedStats() const override {
203-
BufferedStats stats;
202+
RowGroupWriter::BufferedStats EstimatedBufferedStats() const override {
203+
RowGroupWriter::BufferedStats stats;
204204
if (closed_) {
205205
return stats;
206206
}

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)