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