hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Hyde (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-12640) Allow StatsOptimizer to optimize the query for Constant GroupBy keys
Date Thu, 10 Dec 2015 20:23:11 GMT

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

Julian Hyde commented on HIVE-12640:
------------------------------------

If {{src}} is empty, according to the SQL standard, should {code} select count('1') from src
group by '1'{code} and {code} select count('1') from src{code} return the same result? My
understanding is that the first should return 1 row, the second 0 rows.

> Allow StatsOptimizer to optimize the query for Constant GroupBy keys 
> ---------------------------------------------------------------------
>
>                 Key: HIVE-12640
>                 URL: https://issues.apache.org/jira/browse/HIVE-12640
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Hari Sankar Sivarama Subramaniyan
>            Assignee: Hari Sankar Sivarama Subramaniyan
>         Attachments: HIVE-12640.1.patch
>
>
> {code}
> hive> select count('1') from src group by '1';
> {code}
> In the above query, while performing StatsOptimizer optimization we can safely ignore
the group by on the constant key '1' since the above query will return the same result as
"select count('1') from src".



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

Mime
View raw message