Skip to content

Commit f33877c

Browse files
author
Noam Preil
committed
optimization: comparison: when DataType is static, skip reflection
1 parent a489ef0 commit f33877c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

arrow/compare.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ func TypeEqual(left, right DataType, opts ...TypeEqualOption) bool {
4545
}
4646

4747
switch {
48+
case left == right:
49+
return true
4850
case left == nil || right == nil:
49-
return left == nil && right == nil
51+
return false
5052
case left.ID() != right.ID():
5153
return false
5254
}

0 commit comments

Comments
 (0)