You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Pooja Nilangekar (JIRA)" <ji...@apache.org> on 2018/11/21 19:46:00 UTC
[jira] [Commented] (IMPALA-7878) Bad SQL generated by compute
incremental stats
[ https://issues.apache.org/jira/browse/IMPALA-7878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16695190#comment-16695190 ]
Pooja Nilangekar commented on IMPALA-7878:
------------------------------------------
[~Paul.Rogers] Assigning it to you because you've be working on the analysis/rewrite part of the front end. You could add to the list if you think this is related. Please reassign/reword if necessary.
> Bad SQL generated by compute incremental stats
> -----------------------------------------------
>
> Key: IMPALA-7878
> URL: https://issues.apache.org/jira/browse/IMPALA-7878
> Project: IMPALA
> Issue Type: Improvement
> Components: Frontend
> Reporter: Pooja Nilangekar
> Assignee: Paul Rogers
> Priority: Major
>
> Computing incremental stats on partitions generates bad sql for instance:
> For a table foo partitioned by column bar, the compute stats statement:
> {code:java}
> compute incremental stats foo partition (bar = 1);
> {code}
> would generate the following query:
> {code:java}
> SELECT COUNT(*), month FROM foo WHERE (bar=1) GROUP BY bar;
> {code}
> If this were to be rewritten as follows, it would produce fewer fragments and hence also reduce query memory by avoiding a hash aggregation node.
> {code:java}
> SELECT COUNT(*), 1 FROM foo WHERE bar=1;
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org