[
https://issues.apache.org/jira/browse/ASTERIXDB-2468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16664366#comment-16664366
]
Chen Luo commented on ASTERIXDB-2468:
-------------------------------------
[~dlychagin-cb] Can you confirm this is a correct behavior or a bug?
> 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)