[
https://issues.apache.org/jira/browse/ASTERIXDB-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16694146#comment-16694146
]
ASF subversion and git services commented on ASTERIXDB-2468:
------------------------------------------------------------
Commit f9d70deb97a04cdc75e71a9f96940abf2c47f886 in asterixdb's branch
refs/heads/master from luochen
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=f9d70de ]
[ASTERIXDB-2468] Extend CountVarToCountOneRule to support no group-by
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- Extend CountVarToCountOneRule to support the no group-by case so
that count queries without group-by can be handled as well.
- Also extend this rule to support SQL_COUNT. In this case, count(v)
is replaced with count(1) only v is not nullable.
Change-Id: Ie0808912cf45d3a914ebf7f69ec42f73b33c071f
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3024
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Contrib: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Dmitry Lychagin <[email protected]>
> Projection pushdown is not performed correctly for COUNT()
> ----------------------------------------------------------
>
> Key: ASTERIXDB-2468
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2468
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: COMP - Compiler
> Reporter: Chen Luo
> Priority: Major
>
> The following query performs projection pushdown correctly to project out
> records so that only pks are sorted:
> {code}
> select count(*) from (select * from %s.%s where sid>=%d AND sid<=%d order by
> id) tmp;
> {code}
> However, when a dataset variable is referenced by count(), projection
> pushdown is not working anymore and full records are sorted
> {code}
> select count(tmp) from (select * from %s.%s where sid>=%d AND sid<=%d order
> by id) tmp;
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)