8000 [PGRPO-5375] Add GROUPING SETS test into unsupported.sql · postgrespro/aqo@f6d9b06 · GitHub
[go: up one dir, main page]

Skip to content

Commit f6d9b06

Browse files
Damir BelyalovAndrey Lepikhov
authored andcommitted
[PGRPO-5375] Add GROUPING SETS test into unsupported.sql
1 parent e8b960b commit f6d9b06

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

expected/unsupported.out

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,34 @@ WHERE q2.x > 1;
126126
JOINS: 0
127127
(13 rows)
128128

129+
--
130+
-- Doesn't support GROUPING SETS clause
131+
--
132+
SELECT count(*) FROM (SELECT x, y FROM t1 GROUP BY GROUPING SETS ((x,y), (x), (y), ())) AS q1;
133+
count
134+
-------
135+
31
136+
(1 row)
137+
138+
EXPLAIN (COSTS OFF)
139+
SELECT count(*) FROM (SELECT x, y FROM t1 GROUP BY GROUPING SETS ((x,y), (x), (y), ())) AS q1;
140+
QUERY PLAN
141+
------------------------------
142+
Aggregate
143+
AQO not used
144+
-> MixedAggregate
145+
AQO not used
146+
Hash Key: t1.x, t1.y
147+
Hash Key: t1.x
148+
Hash Key: t1.y
149+
Group Key: ()
150+
-> Seq Scan on t1
151+
AQO: rows=1000
152+
Using aqo: true
153+
AQO mode: LEARN
154+
JOINS: 0
155+
(13 rows)
156+
129157
--
130158
-- The subplans issue
131159
--

sql/unsupported.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ SELECT count(*) FROM (
5050
) AS q2
5151
WHERE q2.x > 1;
5252

53+
--
54+
-- Doesn't support GROUPING SETS clause
55+
--
56+
SELECT count(*) FROM (SELECT x, y FROM t1 GROUP BY GROUPING SETS ((x,y), (x), (y), ())) AS q1;
57+
EXPLAIN (COSTS OFF)
58+
SELECT count(*) FROM (SELECT x, y FROM t1 GROUP BY GROUPING SETS ((x,y), (x), (y), ())) AS q1;
59+
5360
--
5461
-- The subplans issue
5562
--

0 commit comments

Comments
 (0)
0