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: [email protected]

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

Reply via email to