Skip to content

Commit 610098b

Browse files
committed
Use variable in sql file
1 parent aa11ea8 commit 610098b

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

src/test/regress/sql/cbdb_parallel.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- CBDB PARALLEL
33
-- Test CBDB style parallel plan.
44
-- GUCs shoule be set with local, do not disturb other parallel plans.
5-
-- Should not use force_parallel_mode as it will ignore plan and check results only.
5+
-- Should not use debug_parallel_query as it will ignore plan and check results only.
66
-- We want to check plan in this file!
77
-- If there is need to do that, set it local inside a transaction.
88
-- Set optimizer off in this file, ORCA parallel is not supported.
@@ -31,7 +31,7 @@
3131
-- 12 CdbLocusType_HashedWorkers
3232
--
3333
--
34-
set debug_parallel_query=regress;
34+
set debug_parallel_query=off;
3535
set optimizer = off;
3636

3737
create schema test_parallel;
@@ -220,7 +220,7 @@ set local enable_parallel = on;
220220
create index on t1(c2);
221221
insert into t1 select i, i from generate_series(1, 10000000) i;
222222
analyze t1;
223-
set local force_parallel_mode = 1;
223+
set local debug_parallel_query=regress;
224224
set local enable_seqscan = off;
225225
explain(locus, costs off) select c2 from t1;
226226
-- results check
@@ -897,7 +897,7 @@ abort;
897897
begin;
898898
set local optimizer=off;
899899
set local enable_parallel=on;
900-
set local force_parallel_mode =1 ;
900+
set local debug_parallel_query=regress;
901901
set local min_parallel_table_scan_size = 0;
902902
create table semi_t1 (c1 integer) with(parallel_workers=2) distributed randomly;
903903
create table semi_t2 (c2 integer) with(parallel_workers=2) distributed randomly;
@@ -991,5 +991,5 @@ drop schema test_parallel cascade;
991991
-- end_ignore
992992

993993
reset gp_appendonly_insert_files;
994-
reset force_parallel_mode;
994+
reset debug_parallel_query;
995995
reset optimizer;

src/test/regress/sql/qp_gist_indexes2.sql

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ language plpython3u;
3030
CREATE TABLE GistTable1 ( id INTEGER, owner VARCHAR, description VARCHAR, property BOX, poli POLYGON, bullseye CIRCLE, v VARCHAR, t TEXT, f FLOAT, p POINT, c CIRCLE, filler VARCHAR DEFAULT 'This is here just to take up space so that we use more pages of data and sequential scans take a lot more time. Stones tinheads and mixers coming; we did it all on our own; this summer I hear the crunching; 11 dead in Ohio. Got right down to it; we were cutting us down; could have had fun but, no; left them face down dead on the ground. How can you listen when you know?'
3131
)
3232
DISTRIBUTED BY (id);
33-
33+
\getenv abs_srcdir PG_ABS_SRCDIR
34+
\set PropertyInfo_file :abs_srcdir '/data/PropertyInfo.txt'
3435
COPY GistTable1 FROM
35-
'@abs_srcdir@/data/PropertyInfo.txt'
36+
:'PropertyInfo_file'
3637
CSV
3738
;
3839
ANALYZE GistTable1;
@@ -472,7 +473,7 @@ CREATE TABLE GistTable1 ( id INTEGER, owner VARCHAR, description VARCHAR, proper
472473
DISTRIBUTED BY (id);
473474

474475
COPY GistTable1 FROM
475-
'@abs_srcdir@/data/PropertyInfo.txt'
476+
:'PropertyInfo_file'
476477
CSV
477478
;
478479
-- ----------------------------------------------------------------------
@@ -871,7 +872,7 @@ CREATE TABLE GistTable1 ( id INTEGER, owner VARCHAR, description VARCHAR, proper
871872
DISTRIBUTED BY (id);
872873

873874
COPY GistTable1 FROM
874-
'@abs_srcdir@/data/PropertyInfo.txt'
875+
:'PropertyInfo_file'
875876
CSV
876877
;
877878
-- ----------------------------------------------------------------------
@@ -1271,7 +1272,7 @@ CREATE TABLE GistTable1 ( id INTEGER, owner VARCHAR, description VARCHAR, proper
12711272
DISTRIBUTED BY (id);
12721273

12731274
COPY GistTable1 FROM
1274-
'@abs_srcdir@/data/PropertyInfo.txt'
1275+
:'PropertyInfo_file'
12751276
CSV
12761277
;
12771278
-- ----------------------------------------------------------------------
@@ -1672,7 +1673,7 @@ CREATE TABLE GistTable1 ( id INTEGER, owner VARCHAR, description VARCHAR, proper
16721673
DISTRIBUTED BY (id);
16731674

16741675
COPY GistTable1 FROM
1675-
'@abs_srcdir@/data/PropertyInfo.txt'
1676+
:'PropertyInfo_file'
16761677
CSV
16771678
;
16781679
-- ----------------------------------------------------------------------

src/test/regress/sql/qp_regexp.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ distributed by (lname);
2727

2828
\getenv abs_srcdir PG_ABS_SRCDIR
2929
\set phone_book_file :abs_srcdir '/data/phone_book.txt'
30-
\copy public.phone_book from :'phone_book_file' delimiter as '|'
30+
copy public.phone_book from :'phone_book_file' delimiter as '|'
3131

3232
drop table if exists phone_book_substr;
3333

src/test/regress/sql/session_reset.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
set log_min_messages to ERROR;
33
\getenv abs_builddir ABS_BUILDDIR
4-
\set regress_dll :abs_builddir'/regress.so'
4+
\set regress_dll :abs_builddir '/regress.so'
55
CREATE OR REPLACE FUNCTION gp_execute_on_server(content int, query text) returns text
66
language C as :'regress_dll', 'gp_execute_on_server';
77

0 commit comments

Comments
 (0)