| 1554 | } |
| 1555 | |
| 1556 | void InitBlock() { |
| 1557 | DCHECK_GT(total_values_remaining_, 0) << "InitBlock called at EOF"; |
| 1558 | |
| 1559 | if (!decoder_->GetZigZagVlqInt(&min_delta_)) |
| 1560 | ParquetException::EofException("InitBlock EOF"); |
| 1561 | |
| 1562 | // read the bitwidth of each miniblock |
| 1563 | uint8_t* bit_width_data = delta_bit_widths_->mutable_data(); |
| 1564 | for (uint32_t i = 0; i < mini_blocks_per_block_; ++i) { |
| 1565 | if (!decoder_->GetAligned<uint8_t>(1, bit_width_data + i)) { |
| 1566 | ParquetException::EofException("Decode bit-width EOF"); |
| 1567 | } |
| 1568 | // Note that non-conformant bitwidth entries are allowed by the Parquet spec |
| 1569 | // for extraneous miniblocks in the last block (GH-14923), so we check |
| 1570 | // the bitwidths when actually using them (see InitMiniBlock()). |
| 1571 | } |
| 1572 | |
| 1573 | mini_block_idx_ = 0; |
| 1574 | first_block_initialized_ = true; |
| 1575 | InitMiniBlock(bit_width_data[0]); |
| 1576 | } |
| 1577 | |
| 1578 | void InitMiniBlock(int bit_width) { |
| 1579 | if (ARROW_PREDICT_FALSE(bit_width > kMaxDeltaBitWidth)) { |
nothing calls this directly
no test coverage detected