| 36 | namespace arrow::extension { |
| 37 | |
| 38 | bool 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 | |
| 57 | std::string VariableShapeTensorType::ToString(bool show_metadata) const { |
| 58 | std::stringstream ss; |
nothing calls this directly
no test coverage detected