You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Boaz Ben-Zvi (JIRA)" <ji...@apache.org> on 2018/12/05 05:18:00 UTC

[jira] [Created] (DRILL-6881) Hash-Table insert and probe: Compare hash values before keys

Boaz Ben-Zvi created DRILL-6881:
-----------------------------------

             Summary: Hash-Table insert and probe: Compare hash values before keys
                 Key: DRILL-6881
                 URL: https://issues.apache.org/jira/browse/DRILL-6881
             Project: Apache Drill
          Issue Type: Improvement
          Components: Execution - Relational Operators
    Affects Versions: 1.14.0
            Reporter: Boaz Ben-Zvi
            Assignee: Boaz Ben-Zvi
             Fix For: 1.16.0


  When checking for existence of a key in the hash table (during _put_ or _probe_ operations), the value of that key is compared (using generated code) with a potential match key (same bucket). 
   This comparison is slightly expensive (e.g., long keys, multi column keys, checking null conditions, NaN, etc). Instead, if the hash-values of the two keys are compared first (at practically zero cost), then the costly comparison can be avoided in case the hash values don't match.
 This code change is trivial, and given that the relevant Hash-Table code is *hot code*, then even minute improvements could add up.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)