AliRana30 commented on PR #49105:
URL: https://github.com/apache/arrow/pull/49105#issuecomment-3831326949

   @kou On your request, I have added a new test case, 
`TestEqualityMismatchedDimensions`, in  
   `cpp/src/arrow/sparse_tensor_test.cc`.
   
   **Test details:**  
   This test compares `SparseCSFIndex` objects with mismatched dimensions (for 
example, 1D vs 2D) to verify that `Equals` now safely returns `false` instead 
of causing a segfault.
   
   **Fix summary:**  
   The fix adds explicit checks for the sizes of `indices`, `indptr`, and 
`axis_order` before attempting to iterate over them, ensuring safe comparison 
when dimensions do not match.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to