| 552 | } |
| 553 | |
| 554 | Status ValidateBinaryScalar(const BaseBinaryScalar& s) { |
| 555 | if (s.is_valid && !s.value) { |
| 556 | return Status::Invalid(s.type->ToString(), |
| 557 | " scalar is marked valid but doesn't have a value"); |
| 558 | } |
| 559 | if (!s.is_valid && s.value) { |
| 560 | return Status::Invalid(s.type->ToString(), |
| 561 | " scalar is marked null but has a value"); |
| 562 | } |
| 563 | return Status::OK(); |
| 564 | } |
| 565 | }; |
| 566 | |
| 567 | template <typename T, size_t N> |