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

Method ExtensionEquals

cpp/src/arrow/extension/fixed_shape_tensor.cc:41–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39namespace arrow::extension {
40
41bool FixedShapeTensorType::ExtensionEquals(const ExtensionType& other) const {
42 if (extension_name() != other.extension_name()) {
43 return false;
44 }
45 const auto& other_ext = internal::checked_cast<const FixedShapeTensorType&>(other);
46
47 const bool permutation_equivalent =
48 (permutation_ == other_ext.permutation()) ||
49 (internal::IsPermutationTrivial(permutation_) &&
50 internal::IsPermutationTrivial(other_ext.permutation()));
51
52 return (storage_type()->Equals(other_ext.storage_type())) &&
53 (this->shape() == other_ext.shape()) && (dim_names_ == other_ext.dim_names()) &&
54 permutation_equivalent;
55}
56
57std::string FixedShapeTensorType::ToString(bool show_metadata) const {
58 std::stringstream ss;

Callers

nothing calls this directly

Calls 6

IsPermutationTrivialFunction · 0.85
storage_typeMethod · 0.80
extension_nameFunction · 0.70
extension_nameMethod · 0.45
EqualsMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected