| 808 | } |
| 809 | |
| 810 | bool DictionaryScalar::IsLogicalNull() const { |
| 811 | if (!is_valid) { |
| 812 | return true; |
| 813 | } |
| 814 | const auto& dict = value.dictionary; |
| 815 | int64_t index_value = DictionaryIndexValue(*value.index).ValueOrDie(); |
| 816 | DCHECK_GE(index_value, 0); |
| 817 | DCHECK_LT(index_value, dict->length()); |
| 818 | return dict->IsNull(index_value); |
| 819 | } |
| 820 | |
| 821 | std::shared_ptr<DictionaryScalar> DictionaryScalar::Make(std::shared_ptr<Scalar> index, |
| 822 | std::shared_ptr<Array> dict) { |