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

Method Equals

cpp/src/arrow/type.cc:862–879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860}
861
862bool Field::Equals(const Field& other, bool check_metadata) const {
863 if (this == &other) {
864 return true;
865 }
866 if (this->name_ == other.name_ && this->nullable_ == other.nullable_ &&
867 this->type_->Equals(*other.type_.get(), check_metadata)) {
868 if (!check_metadata) {
869 return true;
870 } else if (this->HasMetadata() && other.HasMetadata()) {
871 return metadata_->Equals(*other.metadata_);
872 } else if (!this->HasMetadata() && !other.HasMetadata()) {
873 return true;
874 } else {
875 return false;
876 }
877 }
878 return false;
879}
880
881bool Field::Equals(const std::shared_ptr<Field>& other, bool check_metadata) const {
882 return Equals(*other.get(), check_metadata);

Calls 11

HasMetadataMethod · 0.95
TypeEqualsFunction · 0.85
endiannessFunction · 0.85
EqualsFunction · 0.70
num_fieldsFunction · 0.70
fieldFunction · 0.70
getMethod · 0.45
endiannessMethod · 0.45
num_fieldsMethod · 0.45
emptyMethod · 0.45
fieldMethod · 0.45

Tested by 15

TESTFunction · 0.36
TYPED_TEST_PFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
TYPED_TEST_PFunction · 0.36
TEST_FFunction · 0.36
TYPED_TEST_PFunction · 0.36
MakeMethod · 0.36
TESTFunction · 0.36
TYPED_TESTFunction · 0.36