hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-15160) Can't order by an unselected column
Date Tue, 23 May 2017 15:51:05 GMT

    [ https://issues.apache.org/jira/browse/HIVE-15160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16021366#comment-16021366
] 

Ashutosh Chauhan commented on HIVE-15160:
-----------------------------------------

Latest patch looks quite good. Seems like some tests are failing. Once you fix them, can you
also update RB after that?

> 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,
HIVE-15160.10.patch, HIVE-15160.11.patch, HIVE-15160.12.patch, HIVE-15160.13.patch, HIVE-15160.14.patch,
HIVE-15160.15.patch, HIVE-15160.16.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)

Mime
View raw message