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

Method Equals

cpp/src/arrow/datum.cc:214–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214bool 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
235std::string Datum::ToString() const {
236 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