| 537 | |
| 538 | template <typename ArrowType, typename T = typename ArrowType::c_type> |
| 539 | void PutIndicesTyped(const ::arrow::Array& data) { |
| 540 | auto values = data.data()->GetValues<T>(1); |
| 541 | size_t buffer_position = buffered_indices_.size(); |
| 542 | buffered_indices_.resize(buffer_position + |
| 543 | static_cast<size_t>(data.length() - data.null_count())); |
| 544 | ::arrow::internal::VisitSetBitRunsVoid( |
| 545 | data.null_bitmap_data(), data.offset(), data.length(), |
| 546 | [&](int64_t position, int64_t length) { |
| 547 | for (int64_t i = 0; i < length; ++i) { |
| 548 | buffered_indices_[buffer_position++] = |
| 549 | static_cast<int32_t>(values[i + position]); |
| 550 | } |
| 551 | }); |
| 552 | |
| 553 | // Track unencoded bytes based on dictionary value type |
| 554 | if constexpr (std::is_same_v<DType, ByteArrayType>) { |
| 555 | // For ByteArray, need to look up actual lengths from dictionary |
| 556 | for (size_t idx = |
| 557 | buffer_position - static_cast<size_t>(data.length() - data.null_count()); |
| 558 | idx < buffer_position; ++idx) { |
| 559 | memo_table_.VisitValue(buffered_indices_[idx], [&](std::string_view value) { |
| 560 | unencoded_byte_array_data_bytes_ += value.length(); |
| 561 | }); |
| 562 | } |
| 563 | } |
| 564 | } |
| 565 | |
| 566 | void PutIndices(const ::arrow::Array& data) override { |
| 567 | switch (data.type()->id()) { |
nothing calls this directly
no test coverage detected