[
https://issues.apache.org/jira/browse/CALCITE-5425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benchao Li closed CALCITE-5425.
-------------------------------
Fix Version/s: 1.35.0
Resolution: Fixed
Fixed via
https://github.com/apache/calcite/commit/1bda1b5c7ad86adec426d9454a5d4963d253ba6d
[~FrankZou] Thanks for the PR! And [~julianhyde] thanks for the interactions in
Jira.
> Should not pushdown Filter through Aggregate without group keys
> ---------------------------------------------------------------
>
> Key: CALCITE-5425
> URL: https://issues.apache.org/jira/browse/CALCITE-5425
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Steve Carlin
> Assignee: Dan Zou
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.35.0
>
>
> If we are given a query
> SELECT count(x) FROM tbl HAVING false;
> This query should produce an empty set.
> We should not allow a filter to pass through this aggregate. When the
> aggregate has no group by, there is always one implied group (for the whole
> dataset). So if we apply the filter before the aggregate, the implied group
> will still be created. This is not what we want, since the filter should
> produce an empty set.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)