Prasanth Jayachandran created HIVE-13257: --------------------------------------------
Summary: 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)