Skip to content

[C#] ArrowBuffer should either implement IEquatable correctly or not at all #21748

@asfimport

Description

@asfimport

See the discussion here.

ArrowBuffer currently implement IEquatable, but doesn't override GetHashCode.

We should either implement IEquatable correctly by overriding Equals and GetHashCode, or remove IEquatable all together.

Looking at ArrowBuffer's Equals implementation, it compares each value in the buffer, which is not very efficient. Also, this implementation is not consistent with how Memory<T> implements IEquatable - https://source.dot.net/#System.Private.CoreLib/shared/System/Memory.cs,500.

If we continue implementing IEquatable on ArrowBuffer, we should consider implementing it in the same fashion as Memory does.

Reporter: Eric Erhardt / @eerhardt

Note: This issue was originally created as ARROW-5278. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions