Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22507

KeyWrapper comparator create field comparator instances at every comparison

    XMLWordPrintableJSON

Details

    Description

      TopNKeyOperator.KeyWrapperComparator uses separate comparators for each field of the keys. Every time when TopNKeyOperator.KeyWrapperComparator.compare is called a new instance of the field operators are created.

      The field comparators should be created prior any comparison. Probably in the constructor of KeyWrapperComparator or during initializeOp.

      https://github.com/apache/hive/blob/fc81b8909b1a0e6aa15900387a98bccf38ae2247/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java#L964
       

      Attachments

        1. HIVE-22507.1.patch
          4 kB
          Krisztian Kasa
        2. HIVE-22507.2.patch
          4 kB
          Krisztian Kasa
        3. HIVE-22507.2.patch
          4 kB
          Krisztian Kasa

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              kkasa Krisztian Kasa
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: