Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-5278

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: C#
    • Labels:
      None

      Description

      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<T> does.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              eerhardt Eric Erhardt
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: