You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2023/05/24 15:26:01 UTC

[GitHub] [arrow] pitrou commented on a diff in pull request #35455: GH-34375: [C++][Parquet] Ignore page header stats when page index enabled

pitrou commented on code in PR #35455:
URL: https://github.com/apache/arrow/pull/35455#discussion_r1204382141


##########
cpp/src/parquet/column_writer.cc:
##########
@@ -460,7 +460,11 @@ class SerializedPageWriter : public PageWriter {
         ToThrift(page.definition_level_encoding()));
     data_page_header.__set_repetition_level_encoding(
         ToThrift(page.repetition_level_encoding()));
-    data_page_header.__set_statistics(ToThrift(page.statistics()));
+
+    // Write page statistics only when page index is not enabled.
+    if (column_index_builder_ == nullptr) {
+      data_page_header.__set_statistics(ToThrift(page.statistics()));
+    }

Review Comment:
   This only disables writing the statistics, but still computes them, which is suboptimal.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org