@@ -34,6 +34,13 @@ class ColumnWriter;
3434static constexpr uint8_t kParquetMagic [4 ] = {' P' , ' A' , ' R' , ' 1' };
3535static 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+
3744class PARQUET_EXPORT RowGroupWriter {
3845 public:
3946 // Forward declare a virtual class 'Contents' to aid dependency injection and more
@@ -58,9 +65,9 @@ class PARQUET_EXPORT RowGroupWriter {
5865 virtual int64_t total_compressed_bytes () const = 0;
5966 // / \brief total compressed bytes written by the page writer
6067 virtual int64_t total_compressed_bytes_written () const = 0;
61- // / \brief Estimated bytes of values and levels that are buffered by the page writer
62- // / but not written to a page yet
63- virtual int64_t EstimatedBufferedBytes () const = 0;
68+ // / \brief Estimated sizes of buffered data ( levels, values, dict) not yet
69+ // / written to a page.
70+ virtual BufferedStats EstimatedBufferedStats () const = 0;
6471
6572 virtual bool buffered () const = 0;
6673 };
@@ -102,8 +109,9 @@ class PARQUET_EXPORT RowGroupWriter {
102109 int64_t total_compressed_bytes () const ;
103110 // / \brief total compressed bytes written by the page writer
104111 int64_t total_compressed_bytes_written () const ;
105- // / \brief total bytes of values and levels that are buffered by the page writer
106- int64_t total_buffered_bytes () const ;
112+ // / \brief Estimated sizes of buffered data (levels, values, dict) not yet
113+ // / written to a page.
114+ BufferedStats estimated_buffered_stats () const ;
107115
108116 // / Returns whether the current RowGroupWriter is in the buffered mode and is created
109117 // / by calling ParquetFileWriter::AppendBufferedRowGroup.
0 commit comments