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

Method DecodeArrowInternal

cpp/src/parquet/decoder.cc:1560–1581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1558
1559 template <typename ReserveFunc, typename AppendValuesFunc>
1560 int DecodeArrowInternal(int num_values, int null_count, const uint8_t* valid_bits,
1561 int64_t valid_bits_offset, ReserveFunc&& reserve_func,
1562 AppendValuesFunc&& append_values_func) {
1563 if (null_count != 0) {
1564 // TODO(ARROW-34660): implement DecodeArrow with null slots.
1565 ParquetException::NYI("Delta bit pack DecodeArrow with null slots");
1566 }
1567 reserve_func(num_values);
1568 constexpr int kBatchSize = 1024;
1569 std::array<T, kBatchSize> values;
1570 int offset = 0;
1571 while (offset < num_values) {
1572 const int batch_size = std::min(num_values - offset, kBatchSize);
1573 int decoded_count = GetInternal(values.data(), batch_size);
1574 if (decoded_count != batch_size) {
1575 ParquetException::EofException("Not enough values in data page");
1576 }
1577 append_values_func(values.data(), batch_size);
1578 offset += batch_size;
1579 }
1580 return num_values;
1581 }
1582
1583 void InitHeader() {
1584 if (!decoder_->GetVlqInt(&values_per_block_) ||

Callers

nothing calls this directly

Calls 2

NYIFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected