vthemelis commented on code in PR #44633:
URL: https://github.com/apache/arrow/pull/44633#discussion_r1847385795


##########
csharp/src/Apache.Arrow/Schema.cs:
##########
@@ -80,15 +79,20 @@ public int GetFieldIndex(string name, StringComparer 
comparer)
 
         public int GetFieldIndex(string name, IEqualityComparer<string> 
comparer = default)
         {
-            comparer ??= StringComparer.CurrentCulture;
+            if (comparer == null || 
comparer.Equals(StringComparer.CurrentCulture))
+            {
+                return _fieldsIndexLookup[name].First();
+            }
 
-            for (int i = 0; i < _fieldsList.Count; i++)
+            for (var i = 0; i < _fieldsList.Count; ++i)

Review Comment:
   Sure, will undo this.



-- 
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