Skip to content

Commit a336af0

Browse files
committed
Fix some answer files for pax
1 parent 4641972 commit a336af0

30 files changed

Lines changed: 520 additions & 3038 deletions

contrib/pax_storage/src/test/regress/expected/aggregates.out

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,13 +1679,20 @@ from varchar_tbl;
16791679
explain (costs off)
16801680
select string_agg(distinct f1::varchar(2), ',') filter (where length(f1) > 1)
16811681
from varchar_tbl;
1682-
QUERY PLAN
1683-
------------------------------------------------
1684-
Aggregate
1682+
QUERY PLAN
1683+
------------------------------------------------------------------------------------------
1684+
Finalize Aggregate
16851685
-> Gather Motion 3:1 (slice1; segments: 3)
1686-
-> Seq Scan on varchar_tbl
1686+
-> Partial Aggregate
1687+
-> HashAggregate
1688+
Group Key: (((f1)::character varying(2))::text), ','::text
1689+
-> Redistribute Motion 3:3 (slice2; segments: 3)
1690+
Hash Key: (((f1)::character varying(2))::text), ','::text
1691+
-> Streaming HashAggregate
1692+
Group Key: ((f1)::character varying(2))::text, ','::text
1693+
-> Seq Scan on varchar_tbl
16871694
Optimizer: Postgres query optimizer
1688-
(4 rows)
1695+
(11 rows)
16891696

16901697
--
16911698
-- Test combinations of DISTINCT and/or ORDER BY

contrib/pax_storage/src/test/regress/expected/amutils.out

Lines changed: 69 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -40,92 +40,94 @@ select prop,
4040
bogus | | |
4141
(19 rows)
4242

43-
select prop,
44-
pg_indexam_has_property(a.oid, prop) as "AM",
45-
pg_index_has_property('gcircleind'::regclass, prop) as "Index",
46-
pg_index_column_has_property('gcircleind'::regclass, 1, prop) as "Column"
47-
from pg_am a,
48-
unnest(array['asc', 'desc', 'nulls_first', 'nulls_last',
49-
'orderable', 'distance_orderable', 'returnable',
50-
'search_array', 'search_nulls',
51-
'clusterable', 'index_scan', 'bitmap_scan',
52-
'backward_scan',
53-
'can_order', 'can_unique', 'can_multi_col',
54-
'can_exclude', 'can_include',
55-
'bogus']::text[])
56-
with ordinality as u(prop,ord)
57-
where a.amname = 'gist'
58-
order by ord;
59-
prop | AM | Index | Column
60-
--------------------+----+-------+--------
61-
asc | | | f
62-
desc | | | f
63-
nulls_first | | | f
64-
nulls_last | | | f
65-
orderable | | | f
66-
distance_orderable | | | t
67-
returnable | | | f
68-
search_array | | | f
69-
search_nulls | | | t
70-
clusterable | | t |
71-
index_scan | | t |
72-
bitmap_scan | | t |
73-
backward_scan | | f |
74-
can_order | f | |
75-
can_unique | f | |
76-
can_multi_col | t | |
77-
can_exclude | t | |
78-
can_include | t | |
79-
bogus | | |
80-
(19 rows)
81-
43+
-- select prop,
44+
-- pg_indexam_has_property(a.oid, prop) as "AM",
45+
-- pg_index_has_property('gcircleind'::regclass, prop) as "Index",
46+
-- pg_index_column_has_property('gcircleind'::regclass, 1, prop) as "Column"
47+
-- from pg_am a,
48+
-- unnest(array['asc', 'desc', 'nulls_first', 'nulls_last',
49+
-- 'orderable', 'distance_orderable', 'returnable',
50+
-- 'search_array', 'search_nulls',
51+
-- 'clusterable', 'index_scan', 'bitmap_scan',
52+
-- 'backward_scan',
53+
-- 'can_order', 'can_unique', 'can_multi_col',
54+
-- 'can_exclude', 'can_include',
55+
-- 'bogus']::text[])
56+
-- with ordinality as u(prop,ord)
57+
-- where a.amname = 'gist'
58+
-- order by ord;
59+
-- pax not support brin index yet
60+
-- select prop,
61+
-- pg_index_column_has_property('onek_hundred'::regclass, 1, prop) as btree,
62+
-- pg_index_column_has_property('hash_i4_index'::regclass, 1, prop) as hash,
63+
-- pg_index_column_has_property('gcircleind'::regclass, 1, prop) as gist,
64+
-- pg_index_column_has_property('sp_radix_ind'::regclass, 1, prop) as spgist_radix,
65+
-- pg_index_column_has_property('sp_quad_ind'::regclass, 1, prop) as spgist_quad,
66+
-- pg_index_column_has_property('botharrayidx'::regclass, 1, prop) as gin,
67+
-- pg_index_column_has_property('brinidx'::regclass, 1, prop) as brin
68+
-- from unnest(array['asc', 'desc', 'nulls_first', 'nulls_last',
69+
-- 'orderable', 'distance_orderable', 'returnable',
70+
-- 'search_array', 'search_nulls',
71+
-- 'bogus']::text[])
72+
-- with ordinality as u(prop,ord)
73+
-- order by ord;
8274
select prop,
8375
pg_index_column_has_property('onek_hundred'::regclass, 1, prop) as btree,
8476
pg_index_column_has_property('hash_i4_index'::regclass, 1, prop) as hash,
85-
pg_index_column_has_property('gcircleind'::regclass, 1, prop) as gist,
86-
pg_index_column_has_property('sp_radix_ind'::regclass, 1, prop) as spgist_radix,
87-
pg_index_column_has_property('sp_quad_ind'::regclass, 1, prop) as spgist_quad,
88-
pg_index_column_has_property('botharrayidx'::regclass, 1, prop) as gin,
89-
pg_index_column_has_property('brinidx'::regclass, 1, prop) as brin
77+
-- pg_index_column_has_property('gcircleind'::regclass, 1, prop) as gist,
78+
-- pg_index_column_has_property('sp_radix_ind'::regclass, 1, prop) as spgist_radix,
79+
-- pg_index_column_has_property('sp_quad_ind'::regclass, 1, prop) as spgist_quad,
80+
pg_index_column_has_property('botharrayidx'::regclass, 1, prop) as gin
9081
from unnest(array['asc', 'desc', 'nulls_first', 'nulls_last',
9182
'orderable', 'distance_orderable', 'returnable',
9283
'search_array', 'search_nulls',
9384
'bogus']::text[])
9485
with ordinality as u(prop,ord)
9586
order by ord;
96-
prop | btree | hash | gist | spgist_radix | spgist_quad | gin | brin
97-
--------------------+-------+------+------+--------------+-------------+-----+------
98-
asc | t | f | f | f | f | f | f
99-
desc | f | f | f | f | f | f | f
100-
nulls_first | f | f | f | f | f | f | f
101-
nulls_last | t | f | f | f | f | f | f
102-
orderable | t | f | f | f | f | f | f
103-
distance_orderable | f | f | t | f | t | f | f
104-
returnable | t | f | f | t | t | f | f
105-
search_array | t | f | f | f | f | f | f
106-
search_nulls | t | f | t | t | t | f | t
107-
bogus | | | | | | |
87+
prop | btree | hash | gin
88+
--------------------+-------+------+-----
89+
asc | t | f | f
90+
desc | f | f | f
91+
nulls_first | f | f | f
92+
nulls_last | t | f | f
93+
orderable | t | f | f
94+
distance_orderable | f | f | f
95+
returnable | t | f | f
96+
search_array | t | f | f
97+
search_nulls | t | f | f
98+
bogus | | |
10899
(10 rows)
109100

101+
-- select prop,
102+
-- pg_index_has_property('onek_hundred'::regclass, prop) as btree,
103+
-- pg_index_has_property('hash_i4_index'::regclass, prop) as hash,
104+
-- pg_index_has_property('gcircleind'::regclass, prop) as gist,
105+
-- pg_index_has_property('sp_radix_ind'::regclass, prop) as spgist,
106+
-- pg_index_has_property('botharrayidx'::regclass, prop) as gin,
107+
-- pg_index_has_property('brinidx'::regclass, prop) as brin
108+
-- from unnest(array['clusterable', 'index_scan', 'bitmap_scan',
109+
-- 'backward_scan',
110+
-- 'bogus']::text[])
111+
-- with ordinality as u(prop,ord)
112+
-- order by ord;
110113
select prop,
111114
pg_index_has_property('onek_hundred'::regclass, prop) as btree,
112115
pg_index_has_property('hash_i4_index'::regclass, prop) as hash,
113-
pg_index_has_property('gcircleind'::regclass, prop) as gist,
114-
pg_index_has_property('sp_radix_ind'::regclass, prop) as spgist,
115-
pg_index_has_property('botharrayidx'::regclass, prop) as gin,
116-
pg_index_has_property('brinidx'::regclass, prop) as brin
116+
-- pg_index_has_property('gcircleind'::regclass, prop) as gist,
117+
-- pg_index_has_property('sp_radix_ind'::regclass, prop) as spgist,
118+
pg_index_has_property('botharrayidx'::regclass, prop) as gin
117119
from unnest(array['clusterable', 'index_scan', 'bitmap_scan',
118120
'backward_scan',
119121
'bogus']::text[])
120122
with ordinality as u(prop,ord)
121123
order by ord;
122-
prop | btree | hash | gist | spgist | gin | brin
123-
---------------+-------+------+------+--------+-----+------
124-
clusterable | t | f | t | f | f | f
125-
index_scan | t | t | t | t | f | f
126-
bitmap_scan | t | t | t | t | t | t
127-
backward_scan | t | t | f | f | f | f
128-
bogus | | | | | |
124+
prop | btree | hash | gin
125+
---------------+-------+------+-----
126+
clusterable | t | f | f
127+
index_scan | t | t | f
128+
bitmap_scan | t | t | t
129+
backward_scan | t | t | f
130+
bogus | | |
129131
(5 rows)
130132

131133
select amname, prop, pg_indexam_has_property(a.oid, prop) as p

contrib/pax_storage/src/test/regress/expected/btree_index.out

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,5 @@
11
--
22
-- BTREE_INDEX
3-
--
4-
-- directory paths are passed to us in environment variables
5-
\getenv abs_srcdir PG_ABS_SRCDIR
6-
CREATE TABLE bt_i4_heap (
7-
seqno int4,
8-
random int4
9-
);
10-
CREATE TABLE bt_name_heap (
11-
seqno name,
12-
random int4
13-
);
14-
CREATE TABLE bt_txt_heap (
15-
seqno text,
16-
random int4
17-
);
18-
CREATE TABLE bt_f8_heap (
19-
seqno float8,
20-
random int4
21-
);
22-
\set filename :abs_srcdir '/data/desc.data'
23-
COPY bt_i4_heap FROM :'filename';
24-
\set filename :abs_srcdir '/data/hash.data'
25-
COPY bt_name_heap FROM :'filename';
26-
\set filename :abs_srcdir '/data/desc.data'
27-
COPY bt_txt_heap FROM :'filename';
28-
\set filename :abs_srcdir '/data/hash.data'
29-
COPY bt_f8_heap FROM :'filename';
30-
ANALYZE bt_i4_heap;
31-
ANALYZE bt_name_heap;
32-
ANALYZE bt_txt_heap;
33-
ANALYZE bt_f8_heap;
34-
--
35-
-- BTREE ascending/descending cases
36-
--
37-
-- we load int4/text from pure descending data (each key is a new
38-
-- low key) and name/f8 from pure ascending data (each key is a new
39-
-- high key). we had a bug where new low keys would sometimes be
40-
-- "lost".
41-
--
42-
CREATE INDEX bt_i4_index ON bt_i4_heap USING btree (seqno int4_ops);
43-
CREATE INDEX bt_name_index ON bt_name_heap USING btree (seqno name_ops);
44-
CREATE INDEX bt_txt_index ON bt_txt_heap USING btree (seqno text_ops);
45-
CREATE INDEX bt_f8_index ON bt_f8_heap USING btree (seqno float8_ops);
46-
--
473
-- test retrieval of min/max keys for each index
484
--
495
SELECT b.*

contrib/pax_storage/src/test/regress/expected/cluster.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,13 @@ SELECT relname, relkind,
259259
FROM pg_class c WHERE relname LIKE 'clstr_tst%' ORDER BY relname;
260260
relname | relkind | hastoast
261261
----------------------+---------+----------
262-
clstr_tst | r | t
262+
clstr_tst | r | f
263263
clstr_tst_a_seq | S | f
264264
clstr_tst_b | i | f
265265
clstr_tst_b_c | i | f
266266
clstr_tst_c | i | f
267267
clstr_tst_c_b | i | f
268-
clstr_tst_inh | r | t
268+
clstr_tst_inh | r | f
269269
clstr_tst_pkey | i | f
270270
clstr_tst_s | r | f
271271
clstr_tst_s_pkey | i | f
@@ -324,7 +324,7 @@ INSERT INTO clstr_3 VALUES (2);
324324
INSERT INTO clstr_3 VALUES (1);
325325
-- "CLUSTER <tablename>" on a table that hasn't been clustered
326326
CLUSTER clstr_2;
327-
ERROR: there is no previously clustered index for table "clstr_2"
327+
ERROR: there is no previously clustered index or cluster_columns reloptions for table "clstr_2"
328328
CLUSTER clstr_1_pkey ON clstr_1;
329329
CLUSTER clstr_2 USING clstr_2_pkey;
330330
SELECT * FROM clstr_1 UNION ALL

contrib/pax_storage/src/test/regress/expected/compression_1.out

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@ Indexes:
1616
CREATE TABLE cmdata1(f1 TEXT COMPRESSION lz4);
1717
ERROR: compression method lz4 not supported
1818
DETAIL: This functionality requires the server to be built with lz4 support.
19-
HINT: You need to rebuild PostgreSQL using --with-lz4.
2019
INSERT INTO cmdata1 VALUES(repeat('1234567890', 1004));
2120
ERROR: relation "cmdata1" does not exist
2221
LINE 1: INSERT INTO cmdata1 VALUES(repeat('1234567890', 1004));
2322
^
2423
\d+ cmdata1
2524
-- verify stored compression method in the data
26-
-- Pax not support toast, so all of pg_column_compression will return NULL
2725
SELECT pg_column_compression(f1) FROM cmdata;
2826
pg_column_compression
2927
-----------------------
@@ -104,7 +102,7 @@ SELECT pg_column_compression(f1) FROM cmmove2;
104102

105103
-- test externally stored compressed data
106104
CREATE OR REPLACE FUNCTION large_val() RETURNS TEXT LANGUAGE SQL AS
107-
'select array_agg(md5(g::text))::text from generate_series(1, 256) g';
105+
'select array_agg(fipshash(g::text))::text from generate_series(1, 256) g';
108106
CREATE TABLE cmdata2 (f1 text COMPRESSION pglz);
109107
INSERT INTO cmdata2 SELECT large_val() || repeat('a', 4000);
110108
SELECT pg_column_compression(f1) FROM cmdata2;
@@ -128,7 +126,7 @@ LINE 1: SELECT SUBSTR(f1, 200, 5) FROM cmdata1;
128126
SELECT SUBSTR(f1, 200, 5) FROM cmdata2;
129127
substr
130128
--------
131-
8f14e
129+
79026
132130
(1 row)
133131

134132
DROP TABLE cmdata2;

contrib/pax_storage/src/test/regress/expected/copy2.out

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,13 @@ FOR EACH ROW EXECUTE PROCEDURE fn_x_after();
2222
CREATE TRIGGER trg_x_before BEFORE INSERT ON x
2323
FOR EACH ROW EXECUTE PROCEDURE fn_x_before();
2424
COPY x (a, b, c, d, e) from stdin;
25-
ERROR: function cannot execute on a QE slice because it issues a non-SELECT statement
26-
CONTEXT: SQL statement "UPDATE x set e='after trigger fired' where c='stuff'"
27-
PL/pgSQL function fn_x_after() line 3 at SQL statement
25+
ERROR: not implemented yet on pax relations: TupleFetchRowVersion
2826
COPY x (b, d) from stdin;
29-
ERROR: function cannot execute on a QE slice because it issues a non-SELECT statement
30-
CONTEXT: SQL statement "UPDATE x set e='after trigger fired' where c='stuff'"
31-
PL/pgSQL function fn_x_after() line 3 at SQL statement
27+
ERROR: not implemented yet on pax relations: TupleFetchRowVersion
3228
COPY x (b, d) from stdin;
33-
ERROR: function cannot execute on a QE slice because it issues a non-SELECT statement
34-
CONTEXT: SQL statement "UPDATE x set e='after trigger fired' where c='stuff'"
35-
PL/pgSQL function fn_x_after() line 3 at SQL statement
29+
ERROR: not implemented yet on pax relations: TupleFetchRowVersion
3630
COPY x (a, b, c, d, e) from stdin;
37-
ERROR: function cannot execute on a QE slice because it issues a non-SELECT statement
38-
CONTEXT: SQL statement "UPDATE x set e='after trigger fired' where c='stuff'"
39-
PL/pgSQL function fn_x_after() line 3 at SQL statement
31+
ERROR: not implemented yet on pax relations: TupleFetchRowVersion
4032
-- non-existent column in column list: should fail
4133
COPY x (xyz) from stdin;
4234
ERROR: column "xyz" of relation "x" does not exist
@@ -125,29 +117,19 @@ ERROR: extra data after last expected column
125117
CONTEXT: COPY x, line 1: "2002 232 40 50 60 70 80"
126118
-- various COPY options: delimiters, oids, NULL string, encoding
127119
COPY x (b, c, d, e) from stdin delimiter ',' null 'x';
128-
ERROR: function cannot execute on a QE slice because it issues a non-SELECT statement
129-
CONTEXT: SQL statement "UPDATE x set e='after trigger fired' where c='stuff'"
130-
PL/pgSQL function fn_x_after() line 3 at SQL statement
120+
ERROR: not implemented yet on pax relations: TupleFetchRowVersion
131121
COPY x from stdin WITH DELIMITER AS ';' NULL AS '';
132-
ERROR: function cannot execute on a QE slice because it issues a non-SELECT statement
133-
CONTEXT: SQL statement "UPDATE x set e='after trigger fired' where c='stuff'"
134-
PL/pgSQL function fn_x_after() line 3 at SQL statement
122+
ERROR: not implemented yet on pax relations: TupleFetchRowVersion
135123
COPY x from stdin WITH DELIMITER AS ':' NULL AS E'\\X' ENCODING 'sql_ascii';
136-
ERROR: function cannot execute on a QE slice because it issues a non-SELECT statement
137-
CONTEXT: SQL statement "UPDATE x set e='after trigger fired' where c='stuff'"
138-
PL/pgSQL function fn_x_after() line 3 at SQL statement
124+
ERROR: not implemented yet on pax relations: TupleFetchRowVersion
139125
COPY x TO stdout WHERE a = 1;
140126
ERROR: WHERE clause not allowed with COPY TO
141127
LINE 1: COPY x TO stdout WHERE a = 1;
142128
^
143129
COPY x from stdin WHERE a = 50004;
144-
ERROR: function cannot execute on a QE slice because it issues a non-SELECT statement
145-
CONTEXT: SQL statement "UPDATE x set e='after trigger fired' where c='stuff'"
146-
PL/pgSQL function fn_x_after() line 3 at SQL statement
130+
ERROR: not implemented yet on pax relations: TupleFetchRowVersion
147131
COPY x from stdin WHERE a > 60003;
148-
ERROR: function cannot execute on a QE slice because it issues a non-SELECT statement
149-
CONTEXT: SQL statement "UPDATE x set e='after trigger fired' where c='stuff'"
150-
PL/pgSQL function fn_x_after() line 3 at SQL statement
132+
ERROR: not implemented yet on pax relations: TupleFetchRowVersion
151133
COPY x from stdin WHERE f > 60003;
152134
ERROR: column "f" does not exist
153135
LINE 1: COPY x from stdin WHERE f > 60003;

contrib/pax_storage/src/test/regress/expected/create_am.out

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ CREATE OPERATOR CLASS box_ops DEFAULT
3535
FUNCTION 7 gist_box_same(box, box, internal);
3636
-- Create gist2 index on fast_emp4000
3737
CREATE INDEX grect2ind2 ON fast_emp4000 USING gist2 (home_base);
38+
ERROR: pax only support btree/hash/gin/bitmap indexes (pax_access_handle.cc:591)
3839
-- Now check the results from plain indexscan; temporarily drop existing
3940
-- index grect2ind to ensure it doesn't capture the plan
4041
-- DROP INDEX grect2ind;
@@ -104,16 +105,13 @@ SELECT count(*) FROM fast_emp4000 WHERE home_base IS NULL;
104105
ROLLBACK;
105106
-- Try to drop access method: fail because of dependent objects
106107
DROP ACCESS METHOD gist2;
107-
ERROR: cannot drop access method gist2 because other objects depend on it
108-
DETAIL: index grect2ind2 depends on operator class box_ops for access method gist2
109-
HINT: Use DROP ... CASCADE to drop the dependent objects too.
110108
-- Drop access method cascade
111109
-- To prevent a (rare) deadlock against autovacuum,
112110
-- we must lock the table that owns the index that will be dropped
113111
BEGIN;
114112
LOCK TABLE fast_emp4000;
115113
DROP ACCESS METHOD gist2 CASCADE;
116-
NOTICE: drop cascades to index grect2ind2
114+
ERROR: access method "gist2" does not exist
117115
COMMIT;
118116
--
119117
-- Test table access methods

0 commit comments

Comments
 (0)