MCPcopy Create free account
hub / github.com/apache/arrow / Equals

Method Equals

cpp/src/arrow/datum.cc:199–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199bool 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
220std::string Datum::ToString() const {
221 switch (this->kind()) {

Callers

nothing calls this directly

Calls 5

make_arrayMethod · 0.95
SharedPtrEqualsFunction · 0.85
chunked_arrayMethod · 0.80
kindMethod · 0.45
scalarMethod · 0.45

Tested by

no test coverage detected