Validate the source size and get the initial read size.
| 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, |
nothing calls this directly
no test coverage detected