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

Method ExtensionEquals

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

Source from the content-addressed store, hash-verified

36namespace arrow::extension {
37
38bool VariableShapeTensorType::ExtensionEquals(const ExtensionType& other) const {
39 if (extension_name() != other.extension_name()) {
40 return false;
41 }
42 const auto& other_ext = internal::checked_cast<const VariableShapeTensorType&>(other);
43 if (this->ndim() != other_ext.ndim()) {
44 return false;
45 }
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 (dim_names_ == other_ext.dim_names()) &&
54 (uniform_shape_ == other_ext.uniform_shape()) && permutation_equivalent;
55}
56
57std::string VariableShapeTensorType::ToString(bool show_metadata) const {
58 std::stringstream ss;

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected