Skip to content

Commit 961bdcf

Browse files
Alena RybakinaAlena0704
authored andcommitted
Fix aqo_fdw output test.
Delete platform dependent lines containing Memory and add order by command in feature_subspace test for statical result.
1 parent 6ee752a commit 961bdcf

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

expected/aqo_fdw.out

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,13 @@ INSERT INTO main SELECT i, 'val_' || i FROM generate_series(1,100) i;
183183
INSERT INTO ref SELECT i, mod(i, 10) + 1, 'val_' || i FROM generate_series(1,1000) i;
184184
ANALYZE local_main_p0, local_main_p1, main_p2;
185185
ANALYZE local_ref_p0, local_ref_p1, ref_p2;
186+
SELECT str AS result
187+
FROM expln('
186188
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
187189
SELECT * from main AS a, ref AS b
188-
WHERE a.aid = b.aid AND b.bval like 'val%';
189-
QUERY PLAN
190+
WHERE a.aid = b.aid AND b.bval like ''val%''') AS str
191+
WHERE str NOT LIKE '%Memory%';
192+
result
190193
--------------------------------------------------------------------
191194
Append (actual rows=1000 loops=1)
192195
AQO not used
@@ -203,18 +206,20 @@ WHERE a.aid = b.aid AND b.bval like 'val%';
203206
AQO not used
204207
Filter: (bval ~~ 'val%'::text)
205208
-> Hash (actual rows=38 loops=1)
206-
Buckets: 1024 Batches: 1 Memory Usage: 10kB
207209
-> Seq Scan on main_p2 a_3 (actual rows=38 loops=1)
208210
AQO not used
209211
Using aqo: true
210212
AQO mode: LEARN
211213
JOINS: 1
212-
(21 rows)
214+
(20 rows)
213215

216+
SELECT str AS result
217+
FROM expln('
214218
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
215219
SELECT * from main AS a, ref AS b
216-
WHERE a.aid = b.aid AND b.bval like 'val%';
217-
QUERY PLAN
220+
WHERE a.aid = b.aid AND b.bval like ''val%''') AS str
221+
WHERE str NOT LIKE '%Memory%';
222+
result
218223
--------------------------------------------------------------------
219224
Append (actual rows=1000 loops=1)
220225
AQO not used
@@ -231,13 +236,12 @@ WHERE a.aid = b.aid AND b.bval like 'val%';
231236
AQO: rows=300, error=0%
232237
Filter: (bval ~~ 'val%'::text)
233238
-> Hash (actual rows=38 loops=1)
234-
Buckets: 1024 Batches: 1 Memory Usage: 10kB
235239
-> Seq Scan on main_p2 a_3 (actual rows=38 loops=1)
236240
AQO: rows=38, error=0%
237241
Using aqo: true
238242
AQO mode: LEARN
239243
JOINS: 1
240-
(21 rows)
244+
(20 rows)
241245

242246
DROP TABLE main, local_main_p0, local_main_p1;
243247
DROP TABLE ref, local_ref_p0, local_ref_p1;

sql/aqo_fdw.sql

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,19 @@ INSERT INTO ref SELECT i, mod(i, 10) + 1, 'val_' || i FROM generate_series(1,100
114114
ANALYZE local_main_p0, local_main_p1, main_p2;
115115
ANALYZE local_ref_p0, local_ref_p1, ref_p2;
116116

117+
SELECT str AS result
118+
FROM expln('
117119
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
118120
SELECT * from main AS a, ref AS b
119-
WHERE a.aid = b.aid AND b.bval like 'val%';
121+
WHERE a.aid = b.aid AND b.bval like ''val%''') AS str
122+
WHERE str NOT LIKE '%Memory%';
120123

124+
SELECT str AS result
125+
FROM expln('
121126
EXPLAIN (ANALYZE, COSTS OFF, SUMMARY OFF, TIMING OFF)
122127
SELECT * from main AS a, ref AS b
123-
WHERE a.aid = b.aid AND b.bval like 'val%';
128+
WHERE a.aid = b.aid AND b.bval like ''val%''') AS str
129+
WHERE str NOT LIKE '%Memory%';
124130

125131
DROP TABLE main, local_main_p0, local_main_p1;
126132
DROP TABLE ref, local_ref_p0, local_ref_p1;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy