| 212 | } |
| 213 | |
| 214 | bool Datum::Equals(const Datum& other) const { |
| 215 | if (this->kind() != other.kind()) return false; |
| 216 | |
| 217 | switch (this->kind()) { |
| 218 | case Datum::NONE: |
| 219 | return true; |
| 220 | case Datum::SCALAR: |
| 221 | return internal::SharedPtrEquals(this->scalar(), other.scalar()); |
| 222 | case Datum::ARRAY: |
| 223 | return internal::SharedPtrEquals(this->make_array(), other.make_array()); |
| 224 | case Datum::CHUNKED_ARRAY: |
| 225 | return internal::SharedPtrEquals(this->chunked_array(), other.chunked_array()); |
| 226 | case Datum::RECORD_BATCH: |
| 227 | return internal::SharedPtrEquals(this->record_batch(), other.record_batch()); |
| 228 | case Datum::TABLE: |
| 229 | return internal::SharedPtrEquals(this->table(), other.table()); |
| 230 | default: |
| 231 | return false; |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | std::string Datum::ToString() const { |
| 236 | switch (this->kind()) { |
nothing calls this directly
no test coverage detected