hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stephen sprague (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HIVE-13257) GroupBy with column alias does not support AVG
Date Fri, 29 Jul 2016 23:26:20 GMT

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

stephen sprague edited comment on HIVE-13257 at 7/29/16 11:25 PM:
------------------------------------------------------------------

use  "order by 1" as your test case.    you'll get the same error.

I should mention this is hive v2.1.0

{code}
[dwrdevnn1:10001] hive> select count(*), date_key FROM Raw_logs.fact_tracking_datekey_by_hour
group by date_key order by 1 desc;
Fri Jul 29 15:47:06 2016 - Thrift::API::HiveClient2::execute: Error while compiling statement:
FAILED: SemanticException [Error 10128]: Line 1:7 Not yet supported place for UDAF 'count';
HQL was: "select count(*), date_key FROM Raw_logs.fact_tracking_datekey_by_hour group by date_key
order by 1 desc"
{code}

and yes "hive.groupby.orderby.position.alias=true"

thoughts?



was (Author: spragues):
use  "order by 1" as your test case.    you'll get the same error.

{code}
[dwrdevnn1:10001] hive> select count(*), date_key FROM Raw_logs.fact_tracking_datekey_by_hour
group by date_key order by 1 desc;
Fri Jul 29 15:47:06 2016 - Thrift::API::HiveClient2::execute: Error while compiling statement:
FAILED: SemanticException [Error 10128]: Line 1:7 Not yet supported place for UDAF 'count';
HQL was: "select count(*), date_key FROM Raw_logs.fact_tracking_datekey_by_hour group by date_key
order by 1 desc"
{code}

and yes "hive.groupby.orderby.position.alias=true"

thoughts?


> GroupBy with column alias does not support AVG
> ----------------------------------------------
>
>                 Key: HIVE-13257
>                 URL: https://issues.apache.org/jira/browse/HIVE-13257
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.1.0
>            Reporter: Prasanth Jayachandran
>
> For the following query, with hive.groupby.orderby.position.alias set to true
> {code:title=Query}
> SELECT Avg(`t0`.`x_measure__0`) AS `avg_calculation_270497503505567749_ok` 
> FROM   (SELECT `store_sales`.`ss_ticket_number` AS `ss_ticket_number`, 
>                Sum(`store_sales`.`ss_net_paid`) AS `x_measure__0` 
>         FROM   `store_sales` `store_sales` 
>                JOIN `item` `item` 
>                  ON ( `store_sales`.`ss_item_sk` = `item`.`i_item_sk` ) 
>         GROUP  BY `store_sales`.`ss_ticket_number`) `t0` 
> GROUP  BY 1 
> HAVING ( Count(1) > 0 );
> {code}
> it throws the following exception
> {code:title=Exception}
> FAILED: SemanticException [Error 10128]: Line 2:7 Not yet supported place for UDAF 'Avg’
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message