Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DE43C18316 for ; Tue, 25 Aug 2015 06:11:55 +0000 (UTC) Received: (qmail 1001 invoked by uid 500); 25 Aug 2015 06:11:46 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 915 invoked by uid 500); 25 Aug 2015 06:11:46 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 847 invoked by uid 99); 25 Aug 2015 06:11:45 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2015 06:11:45 +0000 Date: Tue, 25 Aug 2015 06:11:45 +0000 (UTC) From: "Gopal V (JIRA)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-11638) ExprNodeDesc hashMap accidentally degrades into O(N) instead of O(1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Gopal V created HIVE-11638: ------------------------------ Summary: ExprNodeDesc hashMap accidentally degrades into O(N) instead of O(1) Key: HIVE-11638 URL: https://issues.apache.org/jira/browse/HIVE-11638 Project: Hive Issue Type: Bug Components: Logical Optimizer Affects Versions: 1.2.1, 1.1.1, 1.0.1, 0.14.0, 1.3.0, 2.0.0 Reporter: Gopal V Assignee: Gopal V Due to the absence of ExprNodeDesc::equals() & the presence of a hashCode(), any code which computes a Set or HashMap of identical objects ends up with a skewed hashmap which degrades column lookups from O(1) to O(N) during optimizer passes. So, several hundred references to a single column desc will be stored in a single hashbucket, but since they default to Object::equals(), they are not equal to each other. Finalize the equals() method, so that the approach from HIVE-10215 carries over safely. -- This message was sent by Atlassian JIRA (v6.3.4#6332)