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


##########
csharp/src/Apache.Arrow/Schema.cs:
##########
@@ -66,6 +61,10 @@ internal Schema(List<Field> fieldsList, 
IReadOnlyDictionary<string, string> meta
             _fieldsDictionary = FieldsLookup.ToDictionary(g => g.Key, g => 
g.First());
 
             Metadata = metadata;
+
+            _fieldsIndexLookup = _fieldsList
+                .Select((x, idx) => (Name: x.Name, Index: idx))
+                .ToLookup(x => x.Name, x => x.Index, 
StringComparer.CurrentCulture);

Review Comment:
   If I change to `Ordinal` then this would be a breaking change as this is 
used in `GetFieldIndex(string)`. Are you okay with changing the behaviour?



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