Repository: calcite Updated Branches: refs/heads/master 141781bf4 -> 9f7e565ff
[CALCITE-311] Added a test-case for filter after window aggregate Filters should not be pushed through window aggregate since it might impact results. Project: http://git-wip-us.apache.org/repos/asf/calcite/repo Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/9f7e565f Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/9f7e565f Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/9f7e565f Branch: refs/heads/master Commit: 9f7e565ffcadd161e8a92906a493f551b9c02f2b Parents: 141781b Author: Vladimir Sitnikov <[email protected]> Authored: Tue Aug 28 12:53:46 2018 +0300 Committer: Vladimir Sitnikov <[email protected]> Committed: Tue Aug 28 12:53:46 2018 +0300 ---------------------------------------------------------------------- core/src/test/resources/sql/winagg.iq | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/calcite/blob/9f7e565f/core/src/test/resources/sql/winagg.iq ---------------------------------------------------------------------- diff --git a/core/src/test/resources/sql/winagg.iq b/core/src/test/resources/sql/winagg.iq index ff0aadc..c7b9482 100644 --- a/core/src/test/resources/sql/winagg.iq +++ b/core/src/test/resources/sql/winagg.iq @@ -404,6 +404,22 @@ order by gender, r; !ok +# [CALCITE-311] Wrong results when filtering the results of windowed aggregation + +select * from ( + select "empid", count(*) over () c + from "hr"."emps" +) where "empid"=100; + ++-------+---+ +| empid | C | ++-------+---+ +| 100 | 4 | ++-------+---+ +(1 row) + +!ok + # [CALCITE-2081] Two windows under a JOIN select a."deptno", a.r as ar, b.r as br from (
