Commit 06d10ed
committed
Add more aggregate test cases for ColumnarIndexScan
Cover query shapes that were missing from the test suite:
- DISTINCT on a segmentby column (Agg without Aggrefs)
- count(*) without GROUP BY
- aggregate only in HAVING (not in SELECT)
- GROUP BY ordinal position
- GROUP BY () empty grouping
- aggregate wrapped in COALESCE
- aggregate above a JOIN
- ordered-set aggregate (percentile_cont)
- bool_and / bool_or
- partition-wise aggregate
- Aggref inside a SubLink in the outer tlist (inner aggregate belongs
to a separate Agg and must not be touched by the outer rewrite)
- HAVING with non-pushable expression on grouping columns (qual stays
with the Agg instead of being pushed to the scan)
- same Aggref node referenced from multiple tlist positions
- GROUP BY column not in SELECT (appears only as resjunk in Agg tlist)
- WHERE mixing segmentby and non-segmentby columns
- HAVING NOT (Aggref ...) and HAVING Aggref IS NULL (mutator must
recurse through BoolExpr and NullTest)
- GROUP BY with explicit collation (grouping expression is a
CollateExpr, not a bare Var)
- self-join on the same hypertable (Agg sits over a Join, not over
a ColumnarScan)1 parent 1dc630f commit 06d10ed
5 files changed
Lines changed: 3522 additions & 158 deletions
File tree
- tsl/test
- expected
- sql/include
0 commit comments