| 512 | |
| 513 | template <typename IndexType> |
| 514 | Status AppendScalarImpl(const typename TypeTraits<T>::ArrayType& dict, |
| 515 | const Scalar& index_scalar, int64_t n_repeats) { |
| 516 | using ScalarType = typename TypeTraits<IndexType>::ScalarType; |
| 517 | const auto index = internal::checked_cast<const ScalarType&>(index_scalar).value; |
| 518 | if (index_scalar.is_valid && dict.IsValid(index)) { |
| 519 | const auto& value = dict.GetView(index); |
| 520 | for (int64_t i = 0; i < n_repeats; i++) { |
| 521 | ARROW_RETURN_NOT_OK(Append(value)); |
| 522 | } |
| 523 | return Status::OK(); |
| 524 | } |
| 525 | return AppendNulls(n_repeats); |
| 526 | } |
| 527 | |
| 528 | Status FinishInternal(std::shared_ptr<ArrayData>* out) override { |
| 529 | std::shared_ptr<ArrayData> dictionary; |
nothing calls this directly
no test coverage detected