Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-9919

Matrices should respect Java's equals and hashCode contract

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: MLlib
    • Labels:
    • Target Version/s:

      Description

      The contract for Java's Object is that a.equals(b) implies a.hashCode == b.hashCode. So usually we need to implement both. The problem with hashCode is that we shouldn't compute it based on all values, which could be very expensive. You can use the implementation of Vector.hashCode as a template, but that requires some changes to avoid hash code collisions.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fliang Feynman Liang
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: