Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-8139

Check for proper equals() and hashCode() when registering a table

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0
    • Table SQL / API
    • None

    Description

      In the current Table API & SQL implementation we compare {{Row}}s at different positions. E.g., for joining we test rows for equality or put them into state. A heap state backend requires proper hashCode() and equals() in order to work correct. Thus, every type in the Table API needs to have these methods implemented.

      We need to check if all fields of a row have implement methods that differ from Object.equals() and Object.hashCode() via reflections. Both coming from TableSource and DataStream/DataSet.

      Additionally, for array types, the Row class should use Arrays.deepEquals() and Arrays.deepHashCode() instead of the non-deep variants.

      Attachments

        Issue Links

          Activity

            People

              Aegeaner Aegeaner
              twalthr Timo Walther
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: