-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-38348: [C#] Make PrimitiveArray<T> support IReadOnlyList<T?> #38680
Conversation
|
I was thinking this would include all scalar arrays, e.g. TimestampArray : IReadOnlyList<DateTime?>, StringArray : IReadOnlyList, TimeXXArray : IReadOnlyList<TimeOnly?>, DateXXArray : IReadOnlyList<DateOnly?>, IReadOnlyList<DateTime?>, BooleanArray : IReadOnlyList<bool?>, BinaryArray : IReadOnlyList<byte[]>. The original issue also suggests implementing ICollection. Would you file followup work items so that this one can be marked as closed if checked-in as-is? |
I have implemented this for all the scalar arrays in your example. Are there any more scalar arrays that need to support For Note that I implemented the various I created a followup issue #38692 for adding support for |
While concision is very nice, a for-loop allows inlining in a way that delegates don't (or don't yet at least) and I think that performance is more important than concision code in infrastructure. |
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 96e62d8. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
…apache#38680) ### What changes are included in this PR? Make Arrow arrays of scalar type T implement the same semantic contract as IReadOnlyList<T?>. Note that this PR does not include similar support for ICollection<T?>. I could add that support in this PR or a future PR. ### Are these changes tested? This PR includes unit tests of the implemented IReadOnlyList<T?> methods. * Closes: apache#38348 Authored-by: voidstar69 <[email protected]> Signed-off-by: Curt Hagenlocher <[email protected]>
What changes are included in this PR?
Make Arrow arrays of scalar type T implement the same semantic contract as IReadOnlyList<T?>.
Note that this PR does not include similar support for ICollection<T?>. I could add that support in this PR or a future PR.
Are these changes tested?
This PR includes unit tests of the implemented IReadOnlyList<T?> methods.