Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DFABD200C28 for ; Mon, 13 Mar 2017 07:34:08 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DE6A0160B8B; Mon, 13 Mar 2017 06:34:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 40DED160B60 for ; Mon, 13 Mar 2017 07:34:08 +0100 (CET) Received: (qmail 95721 invoked by uid 500); 13 Mar 2017 06:34:07 -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 95706 invoked by uid 99); 13 Mar 2017 06:34:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Mar 2017 06:34:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E71E81A02A8 for ; Mon, 13 Mar 2017 06:34:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.651 X-Spam-Level: X-Spam-Status: No, score=0.651 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id HaotLQK6DJkt for ; Mon, 13 Mar 2017 06:34:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E424D5FC06 for ; Mon, 13 Mar 2017 06:34:05 +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 2A2D6E0901 for ; Mon, 13 Mar 2017 06:34:05 +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 77761243B2 for ; Mon, 13 Mar 2017 06:34:04 +0000 (UTC) Date: Mon, 13 Mar 2017 06:34:04 +0000 (UTC) From: "Pengcheng Xiong (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-15160) Can't order by an unselected column MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 13 Mar 2017 06:34:09 -0000 [ https://issues.apache.org/jira/browse/HIVE-15160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pengcheng Xiong updated HIVE-15160: ----------------------------------- Status: Open (was: Patch Available) > Can't order by an unselected column > ----------------------------------- > > Key: HIVE-15160 > URL: https://issues.apache.org/jira/browse/HIVE-15160 > Project: Hive > Issue Type: Bug > Reporter: Pengcheng Xiong > Assignee: Pengcheng Xiong > Attachments: HIVE-15160.01.patch, HIVE-15160.02.patch, HIVE-15160.04.patch, HIVE-15160.05.patch, HIVE-15160.06.patch, HIVE-15160.07.patch, HIVE-15160.08.patch, HIVE-15160.09.patch, HIVE-15160.09.patch > > > If a grouping key hasn't been selected, Hive complains. For comparison, Postgres does not. > Example. Notice i_item_id is not selected: > {code} > select i_item_desc > ,i_category > ,i_class > ,i_current_price > ,sum(cs_ext_sales_price) as itemrevenue > ,sum(cs_ext_sales_price)*100/sum(sum(cs_ext_sales_price)) over > (partition by i_class) as revenueratio > from catalog_sales > ,item > ,date_dim > where cs_item_sk = i_item_sk > and i_category in ('Jewelry', 'Sports', 'Books') > and cs_sold_date_sk = d_date_sk > and d_date between cast('2001-01-12' as date) > and (cast('2001-01-12' as date) + 30 days) > group by i_item_id > ,i_item_desc > ,i_category > ,i_class > ,i_current_price > order by i_category > ,i_class > ,i_item_id > ,i_item_desc > ,revenueratio > limit 100; > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)