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

Method InitBlock

cpp/src/parquet/decoder.cc:1574–1594  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1572 }
1573
1574 void InitBlock() {
1575 DCHECK_GT(total_values_remaining_, 0) << "InitBlock called at EOF";
1576
1577 if (!decoder_->GetZigZagVlqInt(&min_delta_))
1578 ParquetException::EofException("InitBlock EOF");
1579
1580 // read the bitwidth of each miniblock
1581 uint8_t* bit_width_data = delta_bit_widths_->mutable_data();
1582 for (uint32_t i = 0; i < mini_blocks_per_block_; ++i) {
1583 if (!decoder_->GetAligned<uint8_t>(1, bit_width_data + i)) {
1584 ParquetException::EofException("Decode bit-width EOF");
1585 }
1586 // Note that non-conformant bitwidth entries are allowed by the Parquet spec
1587 // for extraneous miniblocks in the last block (GH-14923), so we check
1588 // the bitwidths when actually using them (see InitMiniBlock()).
1589 }
1590
1591 mini_block_idx_ = 0;
1592 first_block_initialized_ = true;
1593 InitMiniBlock(bit_width_data[0]);
1594 }
1595
1596 void InitMiniBlock(int bit_width) {
1597 if (ARROW_PREDICT_FALSE(bit_width > kMaxDeltaBitWidth)) {

Callers

nothing calls this directly

Calls 2

GetZigZagVlqIntMethod · 0.80
mutable_dataMethod · 0.45

Tested by

no test coverage detected