MCPcopy Create free account
hub / github.com/apache/arrow / GetFooterReadSize

Method GetFooterReadSize

cpp/src/parquet/file_reader.cc:477–487  ·  view source on GitHub ↗

Validate the source size and get the initial read size.

Source from the content-addressed store, hash-verified

475
476 // Validate the source size and get the initial read size.
477 int64_t GetFooterReadSize() {
478 if (source_size_ == 0) {
479 throw ParquetInvalidOrCorruptedFileException("Parquet file size is 0 bytes");
480 } else if (source_size_ < kFooterSize) {
481 throw ParquetInvalidOrCorruptedFileException(
482 "Parquet file size is ", source_size_,
483 " bytes, smaller than the minimum file footer (", kFooterSize, " bytes)");
484 }
485
486 return std::min(static_cast<size_t>(source_size_), properties_.footer_read_size());
487 }
488
489 // Validate the magic bytes and get the length of the full footer.
490 uint32_t ParseFooterLength(const std::shared_ptr<::arrow::Buffer>& footer_buffer,

Callers

nothing calls this directly

Tested by

no test coverage detected