fatemehp commented on code in PR #14603:
URL: https://github.com/apache/arrow/pull/14603#discussion_r1049244905
##########
cpp/src/parquet/column_reader.cc:
##########
@@ -386,6 +395,28 @@ std::shared_ptr<Page> SerializedPageReader::NextPage() {
throw ParquetException("Invalid page header");
}
+ const PageType::type page_type = LoadEnumSafe(¤t_page_header_.type);
+ const bool is_data_page =
+ page_type == PageType::DATA_PAGE || page_type ==
PageType::DATA_PAGE_V2;
+
+ // Once we have the header, we will call the skip_page_call_back_ to
+ // determine if we should be skipping this page. If yes, we will advance
the
+ // stream to the next page.
+ if (skip_page_callback_ && is_data_page) {
+ std::variant<format::DataPageHeader, format::DataPageHeaderV2>
data_page_header;
+ if (page_type == PageType::DATA_PAGE) {
+ data_page_header = current_page_header_.data_page_header;
+ } else {
+ data_page_header = current_page_header_.data_page_header_v2;
+ }
+ std::unique_ptr<DataPageStats> data_page_stats =
Review Comment:
I made that clear in the comments for setting the callback function.
--
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]