emkornfield commented on code in PR #48431:
URL: https://github.com/apache/arrow/pull/48431#discussion_r3003147855
##########
cpp/src/parquet/file_reader.cc:
##########
@@ -441,6 +442,35 @@ class SerializedFile : public ParquetFileReader::Contents {
auto footer_buffer,
source_->ReadAt(source_size_ - footer_read_size, footer_read_size));
uint32_t metadata_len = ParseFooterLength(footer_buffer, footer_read_size);
+ if (properties_.read_flatbuffer_metadata_if_present()) {
+ // Try to extract flatbuffer metadata from footer
+ std::string flatbuffer_data;
+ auto result = ExtractFlatbuffer(footer_buffer, &flatbuffer_data);
+ if (result.ok()) {
+ uint32_t required_or_consumed = *result;
+ if (required_or_consumed >
static_cast<uint32_t>(footer_buffer->size()) &&
Review Comment:
we are on C++20 now, so using std::cmp_greater I think would make a lot of
these comparison more succinct.
--
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]