vthemelis opened a new issue, #44650:
URL: https://github.com/apache/arrow/issues/44650
### Describe the bug, including details regarding any error messages,
version, and platform.
In the Schema class, there are three methods used to retrieve individual
fields:
```csharp
public class Schema
{
// ...
public Field GetFieldByName(string name) =>
FieldsLookup[name].FirstOrDefault();
public int GetFieldIndex(string name, StringComparer comparer)
{
IEqualityComparer<string> equalityComparer =
(IEqualityComparer<string>)comparer;
return GetFieldIndex(name, equalityComparer);
}
public int GetFieldIndex(string name, IEqualityComparer<string> comparer
= default)
{
// Implementation using the specified comparer
}
}
```
The first method (GetFieldByName) use the default string comparer, while the
latter two (GetFieldIndex overloads) allow specifying a custom StringComparer
or IEqualityComparer<string>. This inconsistency can be confusing, as it is
unclear when custom comparers are utilized.
### Component(s)
C#
--
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]