| 197 | } |
| 198 | |
| 199 | bool Datum::Equals(const Datum& other) const { |
| 200 | if (this->kind() != other.kind()) return false; |
| 201 | |
| 202 | switch (this->kind()) { |
| 203 | case Datum::NONE: |
| 204 | return true; |
| 205 | case Datum::SCALAR: |
| 206 | return internal::SharedPtrEquals(this->scalar(), other.scalar()); |
| 207 | case Datum::ARRAY: |
| 208 | return internal::SharedPtrEquals(this->make_array(), other.make_array()); |
| 209 | case Datum::CHUNKED_ARRAY: |
| 210 | return internal::SharedPtrEquals(this->chunked_array(), other.chunked_array()); |
| 211 | case Datum::RECORD_BATCH: |
| 212 | return internal::SharedPtrEquals(this->record_batch(), other.record_batch()); |
| 213 | case Datum::TABLE: |
| 214 | return internal::SharedPtrEquals(this->table(), other.table()); |
| 215 | default: |
| 216 | return false; |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | std::string Datum::ToString() const { |
| 221 | switch (this->kind()) { |
nothing calls this directly
no test coverage detected