Skip to content

Commit c70e7a5

Browse files
committed
Fix some answer files
1 parent a37795b commit c70e7a5

File tree

7 files changed

+63
-50
lines changed

7 files changed

+63
-50
lines changed

src/test/regress/expected/gp_aggregates.out

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -373,20 +373,22 @@ insert into multiagg_with_subquery select i, i+1, i+2, i+3 from generate_series(
373373
analyze multiagg_with_subquery;
374374
explain (costs off)
375375
select count(distinct j), count(distinct k), count(distinct m) from (select j,k,m from multiagg_with_subquery group by j,k,m ) sub group by j;
376-
QUERY PLAN
377-
------------------------------------------------------------------------------------------------------------------
376+
QUERY PLAN
377+
------------------------------------------------------------------------------------------------------------------------
378378
Gather Motion 3:1 (slice1; segments: 3)
379379
-> GroupAggregate
380380
Group Key: multiagg_with_subquery.j
381381
-> Sort
382382
Sort Key: multiagg_with_subquery.j, multiagg_with_subquery.k
383-
-> HashAggregate
384-
Group Key: multiagg_with_subquery.j, multiagg_with_subquery.k, multiagg_with_subquery.m
385-
-> Redistribute Motion 3:3 (slice2; segments: 3)
386-
Hash Key: multiagg_with_subquery.j, multiagg_with_subquery.k, multiagg_with_subquery.m
387-
-> Seq Scan on multiagg_with_subquery
383+
-> Redistribute Motion 3:3 (slice2; segments: 3)
384+
Hash Key: multiagg_with_subquery.j
385+
-> HashAggregate
386+
Group Key: multiagg_with_subquery.j, multiagg_with_subquery.k, multiagg_with_subquery.m
387+
-> Redistribute Motion 3:3 (slice3; segments: 3)
388+
Hash Key: multiagg_with_subquery.j, multiagg_with_subquery.k, multiagg_with_subquery.m
389+
-> Seq Scan on multiagg_with_subquery
388390
Optimizer: Postgres query optimizer
389-
(11 rows)
391+
(13 rows)
390392

391393
select count(distinct j), count(distinct k), count(distinct m) from (select j,k,m from multiagg_with_subquery group by j,k,m ) sub group by j;
392394
count | count | count

src/test/regress/expected/gpcopy.out

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ COPY copy_regression_newline from stdin with delimiter '|' newline 'cr' csv;
482482
ERROR: extra data after last expected column
483483
CONTEXT: COPY xxxxx line x: xxx
484484
2|2
485+
\.
485486
"
486487
-- negative: invalid newline
487488
COPY copy_regression_newline from stdin with delimiter '|' newline 'blah';
@@ -1043,7 +1044,9 @@ CREATE TABLE LINEITEM_5 (LIKE LINEITEM);
10431044
CREATE TABLE LINEITEM_6 (LIKE LINEITEM);
10441045
CREATE TABLE LINEITEM_7 (LIKE LINEITEM);
10451046
CREATE TABLE LINEITEM_8 (LIKE LINEITEM);
1046-
COPY LINEITEM FROM '@abs_srcdir@/data/lineitem.csv' WITH DELIMITER '|' CSV;
1047+
\getenv abs_srcdir PG_ABS_SRCDIR
1048+
\set lineitem_csv :abs_srcdir '/data/lineitem.csv'
1049+
COPY LINEITEM FROM :'lineitem_csv' WITH DELIMITER '|' CSV;
10471050
ANALYZE LINEITEM;
10481051
SELECT COUNT(*) FROM LINEITEM;
10491052
count
@@ -1586,9 +1589,11 @@ CREATE FUNCTION broken_int4in(cstring)
15861589
AS 'int4in'
15871590
LANGUAGE internal IMMUTABLE STRICT;
15881591
NOTICE: return type broken_int4 is only a shell
1592+
\getenv abs_builddir PG_ABS_BUILDDIR
1593+
\set regress_dll :abs_builddir '/regress.so'
15891594
CREATE FUNCTION broken_int4out(broken_int4)
15901595
RETURNS cstring
1591-
AS '@abs_builddir@/regress@DLSUFFIX@', 'broken_int4out'
1596+
AS :'regress_dll', 'broken_int4out'
15921597
LANGUAGE C IMMUTABLE STRICT;
15931598
NOTICE: argument type broken_int4 is only a shell
15941599
CREATE TYPE broken_int4 (

src/test/regress/expected/partition.out

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4872,30 +4872,29 @@ analyze bar;
48724872
set optimizer_segments = 3;
48734873
set optimizer_nestloop_factor = 1.0;
48744874
explain select foo_p.b, foo_p.t from foo_p left outer join bar on foo_p.a = bar.k where foo_p.t is not null and foo_p.a = (array[1])[1];
4875-
QUERY PLAN
4876-
--------------------------------------------------------------------------------------------------
4877-
Gather Motion 3:1 (slice1; segments: 3) (cost=10.28..366.35 rows=13416 width=31)
4878-
-> Hash Right Join (cost=10.28..187.47 rows=4472 width=31)
4879-
Hash Cond: (bar.k = foo_p.a)
4880-
-> Broadcast Motion 3:3 (slice2; segments: 3) (cost=0.00..126.56 rows=2236 width=4)
4881-
-> Seq Scan on bar (cost=0.00..96.75 rows=745 width=4)
4882-
Filter: (k = 1)
4883-
-> Hash (cost=10.21..10.21 rows=6 width=35)
4884-
-> Append (cost=0.00..10.21 rows=6 width=35)
4885-
-> Seq Scan on foo_p_1_prt_2 foo_p_1 (cost=0.00..1.83 rows=1 width=34)
4886-
Filter: ((t IS NOT NULL) AND (a = 1))
4887-
-> Seq Scan on foo_p_1_prt_3 foo_p_2 (cost=0.00..1.83 rows=1 width=34)
4888-
Filter: ((t IS NOT NULL) AND (a = 1))
4889-
-> Seq Scan on foo_p_1_prt_4 foo_p_3 (cost=0.00..1.83 rows=1 width=34)
4890-
Filter: ((t IS NOT NULL) AND (a = 1))
4891-
-> Seq Scan on foo_p_1_prt_5 foo_p_4 (cost=0.00..1.83 rows=1 width=34)
4892-
Filter: ((t IS NOT NULL) AND (a = 1))
4893-
-> Seq Scan on foo_p_1_prt_6 foo_p_5 (cost=0.00..1.83 rows=1 width=34)
4894-
Filter: ((t IS NOT NULL) AND (a = 1))
4895-
-> Seq Scan on foo_p_1_prt_other foo_p_6 (cost=0.00..1.01 rows=1 width=40)
4896-
Filter: ((t IS NOT NULL) AND (a = 1))
4875+
QUERY PLAN
4876+
------------------------------------------------------------------------------------------------------
4877+
Gather Motion 3:1 (slice1; segments: 3) (cost=10000000000.00..10000001082.63 rows=13416 width=31)
4878+
-> Nested Loop Left Join (cost=10000000000.00..10000000903.75 rows=4472 width=31)
4879+
-> Append (cost=0.00..10.21 rows=6 width=35)
4880+
-> Seq Scan on foo_p_1_prt_2 foo_p_1 (cost=0.00..1.83 rows=1 width=34)
4881+
Filter: ((t IS NOT NULL) AND (a = 1))
4882+
-> Seq Scan on foo_p_1_prt_3 foo_p_2 (cost=0.00..1.83 rows=1 width=34)
4883+
Filter: ((t IS NOT NULL) AND (a = 1))
4884+
-> Seq Scan on foo_p_1_prt_4 foo_p_3 (cost=0.00..1.83 rows=1 width=34)
4885+
Filter: ((t IS NOT NULL) AND (a = 1))
4886+
-> Seq Scan on foo_p_1_prt_5 foo_p_4 (cost=0.00..1.83 rows=1 width=34)
4887+
Filter: ((t IS NOT NULL) AND (a = 1))
4888+
-> Seq Scan on foo_p_1_prt_6 foo_p_5 (cost=0.00..1.83 rows=1 width=34)
4889+
Filter: ((t IS NOT NULL) AND (a = 1))
4890+
-> Seq Scan on foo_p_1_prt_other foo_p_6 (cost=0.00..1.01 rows=1 width=40)
4891+
Filter: ((t IS NOT NULL) AND (a = 1))
4892+
-> Materialize (cost=0.00..137.74 rows=2236 width=4)
4893+
-> Broadcast Motion 3:3 (slice2; segments: 3) (cost=0.00..126.56 rows=2236 width=4)
4894+
-> Seq Scan on bar (cost=0.00..96.75 rows=745 width=4)
4895+
Filter: (k = 1)
48974896
Optimizer: Postgres query optimizer
4898-
(21 rows)
4897+
(20 rows)
48994898

49004899
reset optimizer_segments;
49014900
drop table if exists foo_p;

src/test/regress/expected/partition_aggregate.out

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -436,19 +436,25 @@ SELECT c, sum(b order by a) FROM pagg_tab GROUP BY c ORDER BY 1, 2;
436436
Group Key: pagg_tab.c
437437
-> Sort
438438
Sort Key: pagg_tab.c, pagg_tab.a
439-
-> Seq Scan on pagg_tab_p1 pagg_tab
439+
-> Redistribute Motion 3:3 (slice2; segments: 3)
440+
Hash Key: pagg_tab.c
441+
-> Seq Scan on pagg_tab_p1 pagg_tab
440442
-> GroupAggregate
441443
Group Key: pagg_tab_1.c
442444
-> Sort
443445
Sort Key: pagg_tab_1.c, pagg_tab_1.a
444-
-> Seq Scan on pagg_tab_p2 pagg_tab_1
446+
-> Redistribute Motion 3:3 (slice3; segments: 3)
447+
Hash Key: pagg_tab_1.c
448+
-> Seq Scan on pagg_tab_p2 pagg_tab_1
445449
-> GroupAggregate
446450
Group Key: pagg_tab_2.c
447451
-> Sort
448452
Sort Key: pagg_tab_2.c, pagg_tab_2.a
449-
-> Seq Scan on pagg_tab_p3 pagg_tab_2
453+
-> Redistribute Motion 3:3 (slice4; segments: 3)
454+
Hash Key: pagg_tab_2.c
455+
-> Seq Scan on pagg_tab_p3 pagg_tab_2
450456
Optimizer: Postgres query optimizer
451-
(21 rows)
457+
(27 rows)
452458

453459
-- Since GROUP BY clause does not match with PARTITION KEY; we need to do
454460
-- partial aggregation. However, ORDERED SET are not partial safe and thus

src/test/regress/expected/percentile.out

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -513,21 +513,21 @@ select * from percv;
513513
(11 rows)
514514

515515
select pg_get_viewdef('percv');
516-
pg_get_viewdef
517-
-----------------------------------------------------------------------------------------------------------------------------------
518-
SELECT percentile_cont((0.4)::double precision) WITHIN GROUP (ORDER BY (((perct.a / 10))::double precision)) AS percentile_cont,+
519-
MEDIAN(perct.a) AS "median", +
520-
percentile_disc((0.51)::double precision) WITHIN GROUP (ORDER BY perct.a DESC) AS percentile_disc +
521-
FROM perct +
522-
GROUP BY perct.b +
523-
ORDER BY perct.b;
516+
pg_get_viewdef
517+
-----------------------------------------------------------------------------------------------------------------------------
518+
SELECT percentile_cont((0.4)::double precision) WITHIN GROUP (ORDER BY (((a / 10))::double precision)) AS percentile_cont,+
519+
MEDIAN(a) AS "median", +
520+
percentile_disc((0.51)::double precision) WITHIN GROUP (ORDER BY a DESC) AS percentile_disc +
521+
FROM perct +
522+
GROUP BY b +
523+
ORDER BY b;
524524
(1 row)
525525

526526
select pg_get_viewdef('percv2');
527-
pg_get_viewdef
528-
-----------------------------------------------
529-
SELECT MEDIAN(perct.a) AS m1, +
530-
MEDIAN((perct.a)::double precision) AS m2+
527+
pg_get_viewdef
528+
-----------------------------------------
529+
SELECT MEDIAN(a) AS m1, +
530+
MEDIAN((a)::double precision) AS m2+
531531
FROM perct;
532532
(1 row)
533533

src/test/regress/expected/rowsecurity.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3942,6 +3942,7 @@ COPY copy_rel_to TO STDOUT WITH DELIMITER ','; --fail - would be affected by RLS
39423942
ERROR: query would be affected by row-level security policy for table "copy_rel_to"
39433943
SET row_security TO ON;
39443944
COPY copy_rel_to TO STDOUT WITH DELIMITER ','; --ok
3945+
2,two
39453946
-- Check COPY TO as user with permissions and BYPASSRLS
39463947
SET SESSION AUTHORIZATION regress_rls_exempt_user;
39473948
SET row_security TO OFF;

src/test/regress/expected/segspace.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ set local enable_parallel = true;
5858
set local optimizer=off;
5959
set local min_parallel_table_scan_size=0;
6060
set local min_parallel_index_scan_size = 0;
61-
set local force_parallel_mode=1;
61+
set local debug_parallel_query=regress;
6262
EXPLAIN(COSTS OFF) SELECT t1.* FROM segspace_test_hj_skew AS t1, segspace_test_hj_skew AS t2 WHERE t1.i1=t2.i2;
6363
QUERY PLAN
6464
-----------------------------------------------------------------------

0 commit comments

Comments
 (0)