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

[GitHub] [arrow] wgtmac commented on a diff in pull request #35242: GH-35171: [C++][Parquet] Implement CRC for data page v2

wgtmac commented on code in PR #35242:
URL: https://github.com/apache/arrow/pull/35242#discussion_r1174492069


##########
cpp/src/parquet/file_deserialize_test.cc:
##########
@@ -814,6 +834,30 @@ TEST_F(TestPageSerde, DictCrcCheckNonExistent) {
                          /* verification_checksum */ true, /* has_dictionary */ true);
 }
 
+TEST_F(TestPageSerde, DataPageV2CrcCheckSuccessful) {

Review Comment:
   Should we also add test with `has_dictionary=true` for completeness?



##########
cpp/src/parquet/column_reader.cc:
##########
@@ -487,16 +489,15 @@ std::shared_ptr<Page> SerializedPageReader::NextPage() {
 
     const PageType::type page_type = LoadEnumSafe(&current_page_header_.type);
 
-    // TODO(PARQUET-594) crc checksum for DATA_PAGE_V2
-    if (properties_.page_checksum_verification() &&
-        (page_type == PageType::DATA_PAGE || page_type == PageType::DICTIONARY_PAGE) &&
-        current_page_header_.__isset.crc) {
+    if (properties_.page_checksum_verification() && current_page_header_.__isset.crc) {

Review Comment:
   This change works for standard parquet files. However, if user has customized parquet to support index page, this may break their workload.



##########
cpp/src/parquet/file_deserialize_test.cc:
##########
@@ -814,6 +834,30 @@ TEST_F(TestPageSerde, DictCrcCheckNonExistent) {
                          /* verification_checksum */ true, /* has_dictionary */ true);
 }
 
+TEST_F(TestPageSerde, DataPageV2CrcCheckSuccessful) {

Review Comment:
   nit: switching to parameterized test would be more favorable here.



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