| 1621 | } |
| 1622 | |
| 1623 | void InitBlock() { |
| 1624 | DCHECK_GT(total_values_remaining_, 0) << "InitBlock called at EOF"; |
| 1625 | |
| 1626 | if (!decoder_->GetZigZagVlqInt(&min_delta_)) |
| 1627 | ParquetException::EofException("InitBlock EOF"); |
| 1628 | |
| 1629 | // read the bitwidth of each miniblock |
| 1630 | uint8_t* bit_width_data = delta_bit_widths_->mutable_data(); |
| 1631 | for (uint32_t i = 0; i < mini_blocks_per_block_; ++i) { |
| 1632 | if (!decoder_->GetAligned<uint8_t>(1, bit_width_data + i)) { |
| 1633 | ParquetException::EofException("Decode bit-width EOF"); |
| 1634 | } |
| 1635 | // Note that non-conformant bitwidth entries are allowed by the Parquet spec |
| 1636 | // for extraneous miniblocks in the last block (GH-14923), so we check |
| 1637 | // the bitwidths when actually using them (see InitMiniBlock()). |
| 1638 | } |
| 1639 | |
| 1640 | mini_block_idx_ = 0; |
| 1641 | first_block_initialized_ = true; |
| 1642 | InitMiniBlock(bit_width_data[0]); |
| 1643 | } |
| 1644 | |
| 1645 | void InitMiniBlock(int bit_width) { |
| 1646 | if (ARROW_PREDICT_FALSE(bit_width > kMaxDeltaBitWidth)) { |
nothing calls this directly
no test coverage detected