Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-927

org.apache.avro.mapred.Pair.equals uses strict equals for schema

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.4
    • 1.6.0
    • java
    • None
    • Reviewed

    Description

      org.apache.avro.mapred.Pair.equals uses strict equals to compare schemas as opposed to using the equals method. GenericData.Record and GenericData.Array both use the equals method to compare schema. It would be advantageous that two objects with the same schema, if not the same schema object instance, would be considered equal.

      org.apache.avro.mapred.Pair.equals:
      if (this.schema != that.schema)

      org.apache.avro.generic.GenericData.Record.equals:
      if (!schema.equals(that.schema))

      org.apache.avro.generic.GenericData.Array.equals:
      if (!schema.equals(that.schema))

      Attachments

        1. AVRO-927-1.patch
          0.7 kB
          Brock Noland

        Activity

          People

            brocknoland Brock Noland
            brocknoland Brock Noland
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: