emkornfield commented on code in PR #14603:
URL: https://github.com/apache/arrow/pull/14603#discussion_r1030838076


##########
cpp/src/parquet/metadata.h:
##########
@@ -182,6 +184,32 @@ class PARQUET_EXPORT ColumnChunkMetaData {
   std::unique_ptr<ColumnChunkMetaDataImpl> impl_;
 };
 
+// \brief DataPageStats stores statistics about a data page including number of
+// values and rows.
+class PARQUET_EXPORT DataPageStats {
+ public:
+  explicit DataPageStats(EncodedStatistics encoded_statistics, int32_t 
num_values,
+                             std::optional<int32_t> num_rows)
+      : encoded_statistics_(std::move(encoded_statistics)),
+        num_values_(num_values),
+        num_rows_(num_rows) {}
+
+  const EncodedStatistics& statistics() { return encoded_statistics_;}
+
+  int32_t num_values() const {
+    return num_values_;
+  }
+
+  std::optional<int32_t> num_rows() const {
+    return num_rows_;
+  }
+
+ private:
+  const EncodedStatistics encoded_statistics_;

Review Comment:
   this is safe but it seems possible to maybe avoid the copy here, since stats 
need to use later?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to