Krisztian Kasa created HIVE-22507:
-------------------------------------

             Summary: KeyWrapper comparator create subcomparator instances 
every comparison 
                 Key: HIVE-22507
                 URL: https://issues.apache.org/jira/browse/HIVE-22507
             Project: Hive
          Issue Type: Bug
          Components: Physical Optimizer
            Reporter: Krisztian Kasa
            Assignee: Krisztian Kasa
             Fix For: 4.0.0


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
 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to