| 797 | } // namespace |
| 798 | |
| 799 | Result<std::shared_ptr<Scalar>> DictionaryScalar::GetEncodedValue() const { |
| 800 | const auto& dict_type = checked_cast<DictionaryType&>(*type); |
| 801 | |
| 802 | if (!is_valid) { |
| 803 | return MakeNullScalar(dict_type.value_type()); |
| 804 | } |
| 805 | |
| 806 | ARROW_ASSIGN_OR_RAISE(int64_t index_value, DictionaryIndexValue(*value.index)); |
| 807 | return value.dictionary->GetScalar(index_value); |
| 808 | } |
| 809 | |
| 810 | bool DictionaryScalar::IsLogicalNull() const { |
| 811 | if (!is_valid) { |
no test coverage detected