From issues-return-141348-archive-asf-public=cust-asf.ponee.io@hive.apache.org Tue Oct 30 00:51:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2735D180789 for ; Tue, 30 Oct 2018 00:51:05 +0100 (CET) Received: (qmail 56357 invoked by uid 500); 29 Oct 2018 23:51:05 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 56317 invoked by uid 99); 29 Oct 2018 23:51:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Oct 2018 23:51:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id ED666190DAE for ; Mon, 29 Oct 2018 23:51:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id td6Sz6nHWK5k for ; Mon, 29 Oct 2018 23:51:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 274BF5F485 for ; Mon, 29 Oct 2018 23:51:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 62DA5E0E1D for ; Mon, 29 Oct 2018 23:51:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2938427764 for ; Mon, 29 Oct 2018 23:51:02 +0000 (UTC) Date: Mon, 29 Oct 2018 23:51:02 +0000 (UTC) From: "Vineet Garg (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-17041) Aggregate elimination with UNIQUE and NOT NULL column MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-17041?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Vineet Garg updated HIVE-17041: ------------------------------- Resolution: Fixed Status: Resolved (was: Patch Available) This was fixed in=C2=A0HIVE-17043 > Aggregate elimination with UNIQUE and NOT NULL column > ----------------------------------------------------- > > Key: HIVE-17041 > URL: https://issues.apache.org/jira/browse/HIVE-17041 > Project: Hive > Issue Type: Sub-task > Components: Logical Optimizer > Affects Versions: 3.0.0 > Reporter: Jesus Camacho Rodriguez > Assignee: Vineet Garg > Priority: Major > Attachments: HIVE-17041.1.patch > > > If columns are part of a GROUP BY expression and they are UNIQUE and do n= ot accept NULL values, i.e. PK or UK+NOTNULL, the _Aggregate_ operator can = be transformed into a Project operator, as each row will end up in a differ= ent group. > For instance, given that _pk_ is the PRIMARY KEY for the table, the GROUP= BY could be removed from grouping columns for following query: > {code:sql} > SELECT pk, value1 > FROM table_1 > GROUP BY value1, pk, value2; > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)