CurtHagenlocher commented on code in PR #41539: URL: https://github.com/apache/arrow/pull/41539#discussion_r1597487812
########## csharp/src/Apache.Arrow/Arrays/PrimitiveArray.cs: ########## @@ -86,5 +86,30 @@ IEnumerator IEnumerable.GetEnumerator() yield return IsValid(index) ? Values[index] : null; } } + + int ICollection<T?>.Count => Length; + bool ICollection<T?>.IsReadOnly => true; + void ICollection<T?>.Add(T? item) => throw new NotSupportedException("Collection is read-only."); + bool ICollection<T?>.Remove(T? item) => throw new NotSupportedException("Collection is read-only."); + void ICollection<T?>.Clear() => throw new NotSupportedException("Collection is read-only."); + + bool ICollection<T?>.Contains(T? item) Review Comment: I think all the types where this matters should implement IEquatable<T>; the set of types supported by Arrow is effectively closed. That said, this is still potentially a breaking change if someone is using PrimitiveArray to implement a non-Arrow type but the workaround is fairly straightforward. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org