This is an automated email from the ASF dual-hosted git repository.

zeroshade pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-go.git


The following commit(s) were added to refs/heads/main by this push:
     new 94f73abe fix: remove superfluous struct field index compare (#970)
94f73abe is described below

commit 94f73abe159436f84211fb57ff982fb14cd1a955
Author: Willem Jan <[email protected]>
AuthorDate: Wed Jul 22 18:26:09 2026 +0200

    fix: remove superfluous struct field index compare (#970)
    
    The check is superfluous because:
    - Length is verified to equal
    - Next step iterates over fields & asserts the names are equal for each 
index.
    
    These 2 steps essentially check the same thing, without needing expensive 
DeepEqual of 2 maps.
---
 arrow/compare.go | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arrow/compare.go b/arrow/compare.go
index e2c8ada1..bdb4ec2b 100644
--- a/arrow/compare.go
+++ b/arrow/compare.go
@@ -97,10 +97,7 @@ func TypeEqual(left, right DataType, opts 
...TypeEqualOption) bool {
                return true
        case *StructType:
                r := right.(*StructType)
-               switch {
-               case len(l.fields) != len(r.fields):
-                       return false
-               case !reflect.DeepEqual(l.index, r.index):
+               if len(l.fields) != len(r.fields) {
                        return false
                }
                for i := range l.fields {

Reply via email to