You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mapleFU (via GitHub)" <gi...@apache.org> on 2023/06/07 03:17:18 UTC

[GitHub] [arrow] mapleFU opened a new pull request, #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

mapleFU opened a new pull request, #35958:
URL: https://github.com/apache/arrow/pull/35958

   <!--
   Thanks for opening a pull request!
   If this is your first pull request you can find detailed information on how 
   to contribute here:
     * [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
     * [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
   
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   -->
   
   ### Rationale for this change
   
   <!--
    Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.  
   -->
   
   Allow only build Offset Index for some column by disable statistics
   
   ### What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   Fix a tiny bug
   
   ### Are these changes tested?
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   Yes
   
   ### Are there any user-facing changes?
   
   Actually no change?
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please uncomment the line below and explain which changes are breaking.
   -->
   <!-- **This PR includes breaking changes to public APIs.** -->
   
   <!--
   Please uncomment the line below (and provide explanation) if the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld). We use this to highlight fixes to issues that may affect users without their knowledge. For this reason, fixing bugs that cause errors don't count, since those are usually obvious.
   -->
   <!-- **This PR contains a "Critical Fix".** -->


-- 
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


[GitHub] [arrow] wgtmac commented on a diff in pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1220894627


##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5370,12 +5370,53 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
       [6,     "f",  null     ]
     ])"}));
 
-  ReadPageIndexes(/*expect_num_row_groups=*/2, /*expect_num_pages=*/1);
+  ReadPageIndexes(/*expect_num_row_groups=*/1, /*expect_num_pages=*/1);
   for (auto& column_index : column_indexes_) {
     EXPECT_TRUE(column_index.empty);
   }
 }
 
+TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithColumnStatsDisabled) {
+  auto writer_properties = WriterProperties::Builder()
+                               .enable_write_page_index()
+                               ->disable_statistics("c0")
+                               ->max_row_group_length(4)
+                               ->build();
+  auto schema = ::arrow::schema({::arrow::field("c0", ::arrow::int64()),
+                                 ::arrow::field("c1", ::arrow::utf8()),
+                                 ::arrow::field("c2", ::arrow::list(::arrow::int64()))});
+  WriteFile(writer_properties, ::arrow::TableFromJSON(schema, {R"([
+      [1,     "a",  [1]      ],
+      [2,     "b",  [1, 2]   ],
+      [3,     "c",  [null]   ],
+      [null,  "d",  []       ],
+      [5,     null, [3, 3, 3]],
+      [6,     "f",  null     ]
+    ])"}));
+
+  ReadPageIndexes(/*expect_num_row_groups=*/2, /*expect_num_pages=*/1);
+
+  ColumnIndexObject empty_column_index{};
+  empty_column_index.empty = true;
+  EXPECT_THAT(
+      column_indexes_,
+      ::testing::ElementsAre(
+          empty_column_index,

Review Comment:
   That seems duplicate. A valid ColumnIndex must have at least one page. So `null_pages`, `min_values` and `max_values` will not be empty and share the same size if ColumnIndexObject is created from a non null ColumnIndex.



-- 
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


[GitHub] [arrow] mapleFU commented on a diff in pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1220919255


##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5370,12 +5370,53 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
       [6,     "f",  null     ]
     ])"}));
 
-  ReadPageIndexes(/*expect_num_row_groups=*/2, /*expect_num_pages=*/1);
+  ReadPageIndexes(/*expect_num_row_groups=*/1, /*expect_num_pages=*/1);
   for (auto& column_index : column_indexes_) {
     EXPECT_TRUE(column_index.empty);
   }
 }
 
+TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithColumnStatsDisabled) {
+  auto writer_properties = WriterProperties::Builder()
+                               .enable_write_page_index()
+                               ->disable_statistics("c0")
+                               ->max_row_group_length(4)
+                               ->build();
+  auto schema = ::arrow::schema({::arrow::field("c0", ::arrow::int64()),
+                                 ::arrow::field("c1", ::arrow::utf8()),
+                                 ::arrow::field("c2", ::arrow::list(::arrow::int64()))});
+  WriteFile(writer_properties, ::arrow::TableFromJSON(schema, {R"([
+      [1,     "a",  [1]      ],
+      [2,     "b",  [1, 2]   ],
+      [3,     "c",  [null]   ],
+      [null,  "d",  []       ],
+      [5,     null, [3, 3, 3]],
+      [6,     "f",  null     ]
+    ])"}));
+
+  ReadPageIndexes(/*expect_num_row_groups=*/2, /*expect_num_pages=*/1);
+
+  ColumnIndexObject empty_column_index{};
+  empty_column_index.empty = true;
+  EXPECT_THAT(
+      column_indexes_,
+      ::testing::ElementsAre(
+          empty_column_index,

Review Comment:
   Updated



-- 
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


[GitHub] [arrow] wgtmac commented on a diff in pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1221024497


##########
cpp/src/parquet/properties.h:
##########
@@ -154,7 +154,7 @@ class PARQUET_EXPORT ColumnProperties {
         statistics_enabled_(statistics_enabled),
         max_stats_size_(max_stats_size),
         compression_level_(Codec::UseDefaultCompressionLevel()),
-        page_index_enabled_(DEFAULT_IS_PAGE_INDEX_ENABLED) {}
+        page_index_enabled_(page_index_enabled) {}

Review Comment:
   Good catch!



-- 
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


[GitHub] [arrow] wgtmac commented on a diff in pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1220778764


##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5350,6 +5352,30 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTrip) {
                             /*null_counts=*/{1}}));
 }
 
+TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
+  auto writer_properties = WriterProperties::Builder()
+                               .enable_write_page_index()
+                               ->disable_statistics()

Review Comment:
   Should we test this per column?



-- 
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


[GitHub] [arrow] mapleFU commented on a diff in pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1220876422


##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5370,12 +5370,53 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
       [6,     "f",  null     ]
     ])"}));
 
-  ReadPageIndexes(/*expect_num_row_groups=*/2, /*expect_num_pages=*/1);
+  ReadPageIndexes(/*expect_num_row_groups=*/1, /*expect_num_pages=*/1);
   for (auto& column_index : column_indexes_) {
     EXPECT_TRUE(column_index.empty);
   }
 }
 
+TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithColumnStatsDisabled) {
+  auto writer_properties = WriterProperties::Builder()
+                               .enable_write_page_index()
+                               ->disable_statistics("c0")
+                               ->max_row_group_length(4)
+                               ->build();
+  auto schema = ::arrow::schema({::arrow::field("c0", ::arrow::int64()),
+                                 ::arrow::field("c1", ::arrow::utf8()),
+                                 ::arrow::field("c2", ::arrow::list(::arrow::int64()))});
+  WriteFile(writer_properties, ::arrow::TableFromJSON(schema, {R"([
+      [1,     "a",  [1]      ],
+      [2,     "b",  [1, 2]   ],
+      [3,     "c",  [null]   ],
+      [null,  "d",  []       ],
+      [5,     null, [3, 3, 3]],
+      [6,     "f",  null     ]
+    ])"}));
+
+  ReadPageIndexes(/*expect_num_row_groups=*/2, /*expect_num_pages=*/1);
+
+  ColumnIndexObject empty_column_index{};
+  empty_column_index.empty = true;
+  EXPECT_THAT(
+      column_indexes_,
+      ::testing::ElementsAre(
+          empty_column_index,

Review Comment:
   Just want to make clear that it's explicit built from a `nullptr`



-- 
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


[GitHub] [arrow] pitrou commented on a diff in pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1229734947


##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5350,6 +5350,70 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTrip) {
                             /*null_counts=*/{1}}));
 }
 
+TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
+  auto writer_properties = WriterProperties::Builder()
+                               .enable_write_page_index()
+                               ->disable_statistics()
+                               ->build();
+  auto schema = ::arrow::schema({::arrow::field("c0", ::arrow::int64()),
+                                 ::arrow::field("c1", ::arrow::utf8()),
+                                 ::arrow::field("c2", ::arrow::list(::arrow::int64()))});
+  WriteFile(writer_properties, ::arrow::TableFromJSON(schema, {R"([
+      [1,     "a",  [1]      ],
+      [2,     "b",  [1, 2]   ],
+      [3,     "c",  [null]   ],
+      [null,  "d",  []       ],
+      [5,     null, [3, 3, 3]],
+      [6,     "f",  null     ]
+    ])"}));
+
+  ReadPageIndexes(/*expect_num_row_groups=*/1, /*expect_num_pages=*/1);
+  for (auto& column_index : column_indexes_) {
+    // Means page is empty.

Review Comment:
   Which page is empty? I don't understand this comment.



##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5350,6 +5350,70 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTrip) {
                             /*null_counts=*/{1}}));
 }
 
+TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
+  auto writer_properties = WriterProperties::Builder()
+                               .enable_write_page_index()
+                               ->disable_statistics()
+                               ->build();
+  auto schema = ::arrow::schema({::arrow::field("c0", ::arrow::int64()),
+                                 ::arrow::field("c1", ::arrow::utf8()),
+                                 ::arrow::field("c2", ::arrow::list(::arrow::int64()))});
+  WriteFile(writer_properties, ::arrow::TableFromJSON(schema, {R"([
+      [1,     "a",  [1]      ],
+      [2,     "b",  [1, 2]   ],
+      [3,     "c",  [null]   ],
+      [null,  "d",  []       ],
+      [5,     null, [3, 3, 3]],
+      [6,     "f",  null     ]
+    ])"}));
+
+  ReadPageIndexes(/*expect_num_row_groups=*/1, /*expect_num_pages=*/1);
+  for (auto& column_index : column_indexes_) {
+    // Means page is empty.

Review Comment:
   Why not test against `ColumnIndexObject{}` instead?



-- 
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


[GitHub] [arrow] pitrou commented on pull request #35958: GH-35926: [C++][Parquet] Allow disabling ColumnIndex by disabling statistics

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #35958:
URL: https://github.com/apache/arrow/pull/35958#issuecomment-1591831193

   The remaining CI failures are unrelated, will merge.


-- 
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


[GitHub] [arrow] mapleFU commented on a diff in pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1220843467


##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5350,6 +5352,30 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTrip) {
                             /*null_counts=*/{1}}));
 }
 
+TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
+  auto writer_properties = WriterProperties::Builder()
+                               .enable_write_page_index()
+                               ->disable_statistics()

Review Comment:
   Added now



-- 
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


[GitHub] [arrow] mapleFU commented on pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on PR #35958:
URL: https://github.com/apache/arrow/pull/35958#issuecomment-1579810041

   cc @wgtmac @pitrou 


-- 
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


[GitHub] [arrow] mapleFU commented on pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on PR #35958:
URL: https://github.com/apache/arrow/pull/35958#issuecomment-1591141838

   @pitrou @wgtmac Do you still have any comments? 


-- 
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


[GitHub] [arrow] conbench-apache-arrow[bot] commented on pull request #35958: GH-35926: [C++][Parquet] Allow disabling ColumnIndex by disabling statistics

Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #35958:
URL: https://github.com/apache/arrow/pull/35958#issuecomment-1595483364

   Conbench analyzed the 6 benchmark runs on commit `75e4764d`.
   
   There were 3 benchmark results indicating a performance regression:
   
   - Commit Run on `arm64-m6g-linux-compute` at [2023-06-15 16:19:05Z](http://conbench.ursa.dev/compare/runs/f1f9e6ba179a4c478cc7bc360114156a...b17a24c1e0e24d1680a43e8b9c9db082/)
     - [params=num_cols:8/is_partial:1/real_time, source=cpp-micro, suite=arrow-ipc-read-write-benchmark](http://conbench.ursa.dev/compare/benchmarks/0648b022e85c786180009957cf88af8b...0648b3a471227bf180001b46838da8e7)
     - [params=real_time, source=cpp-micro, suite=arrow-io-file-benchmark](http://conbench.ursa.dev/compare/benchmarks/0648b021930673fc8000a4f979cd51ac...0648b3a2c40374648000e13fd3a33b50)
   - and 1 more (see the report linked below)
   
   The [full Conbench report](https://github.com/apache/arrow/runs/14336202188) has more details.


-- 
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


[GitHub] [arrow] wgtmac commented on a diff in pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1220851202


##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5370,12 +5370,53 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
       [6,     "f",  null     ]
     ])"}));
 
-  ReadPageIndexes(/*expect_num_row_groups=*/2, /*expect_num_pages=*/1);
+  ReadPageIndexes(/*expect_num_row_groups=*/1, /*expect_num_pages=*/1);
   for (auto& column_index : column_indexes_) {
     EXPECT_TRUE(column_index.empty);
   }
 }
 
+TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithColumnStatsDisabled) {
+  auto writer_properties = WriterProperties::Builder()
+                               .enable_write_page_index()
+                               ->disable_statistics("c0")
+                               ->max_row_group_length(4)
+                               ->build();
+  auto schema = ::arrow::schema({::arrow::field("c0", ::arrow::int64()),
+                                 ::arrow::field("c1", ::arrow::utf8()),
+                                 ::arrow::field("c2", ::arrow::list(::arrow::int64()))});
+  WriteFile(writer_properties, ::arrow::TableFromJSON(schema, {R"([
+      [1,     "a",  [1]      ],
+      [2,     "b",  [1, 2]   ],
+      [3,     "c",  [null]   ],
+      [null,  "d",  []       ],
+      [5,     null, [3, 3, 3]],
+      [6,     "f",  null     ]
+    ])"}));
+
+  ReadPageIndexes(/*expect_num_row_groups=*/2, /*expect_num_pages=*/1);
+
+  ColumnIndexObject empty_column_index{};
+  empty_column_index.empty = true;
+  EXPECT_THAT(
+      column_indexes_,
+      ::testing::ElementsAre(
+          empty_column_index,

Review Comment:
   Why add a new `empty` flag? Isn't `ColumnIndexObject{}` enough to represent a missing ColumnIndex?



##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5356,7 +5357,6 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
   auto writer_properties = WriterProperties::Builder()
                                .enable_write_page_index()
                                ->disable_statistics()
-                               ->max_row_group_length(4)

Review Comment:
   Why this guy is removed?



-- 
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


[GitHub] [arrow] mapleFU commented on pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on PR #35958:
URL: https://github.com/apache/arrow/pull/35958#issuecomment-1591626254

   I guess CI failed is unrelated, but I've seen some of them


-- 
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


[GitHub] [arrow] pitrou merged pull request #35958: GH-35926: [C++][Parquet] Allow disabling ColumnIndex by disabling statistics

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou merged PR #35958:
URL: https://github.com/apache/arrow/pull/35958


-- 
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


[GitHub] [arrow] mapleFU commented on a diff in pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1229807977


##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5350,6 +5350,70 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTrip) {
                             /*null_counts=*/{1}}));
 }
 
+TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
+  auto writer_properties = WriterProperties::Builder()
+                               .enable_write_page_index()
+                               ->disable_statistics()
+                               ->build();
+  auto schema = ::arrow::schema({::arrow::field("c0", ::arrow::int64()),
+                                 ::arrow::field("c1", ::arrow::utf8()),
+                                 ::arrow::field("c2", ::arrow::list(::arrow::int64()))});
+  WriteFile(writer_properties, ::arrow::TableFromJSON(schema, {R"([
+      [1,     "a",  [1]      ],
+      [2,     "b",  [1, 2]   ],
+      [3,     "c",  [null]   ],
+      [null,  "d",  []       ],
+      [5,     null, [3, 3, 3]],
+      [6,     "f",  null     ]
+    ])"}));
+
+  ReadPageIndexes(/*expect_num_row_groups=*/1, /*expect_num_pages=*/1);
+  for (auto& column_index : column_indexes_) {
+    // Means page is empty.

Review Comment:
   Sure, changed



-- 
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


[GitHub] [arrow] mapleFU commented on a diff in pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1220876116


##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5356,7 +5357,6 @@ TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithStatsDisabled) {
   auto writer_properties = WriterProperties::Builder()
                                .enable_write_page_index()
                                ->disable_statistics()
-                               ->max_row_group_length(4)

Review Comment:
   No need to split rowgroup here, just ignore it



-- 
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


[GitHub] [arrow] mapleFU commented on pull request #35958: GH-35926: [C++][Parquet] Testing disable ColumnIndex by disable statistics

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on PR #35958:
URL: https://github.com/apache/arrow/pull/35958#issuecomment-1583974487

   @pitrou Mind take a look?


-- 
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