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

Method GetFooterReadSize

cpp/src/parquet/file_reader.cc:480–490  ·  view source on GitHub ↗

Validate the source size and get the initial read size.

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Tested by

no test coverage detected