Commit cdef866
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 45a3f53 commit cdef866
6 files changed
Lines changed: 3523 additions & 163 deletions
File tree
- tsl
- src/nodes/columnar_index_scan
- test
- expected
- sql/include
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
| 742 | + | |
747 | 743 | | |
748 | 744 | | |
749 | 745 | | |
| |||
0 commit comments