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

Method GetFooterReadSize

cpp/src/parquet/file_reader.cc:478–488  ·  view source on GitHub ↗

Validate the source size and get the initial read size.

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Tested by

no test coverage detected