This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new 610098bb395 Use variable in sql file
610098bb395 is described below
commit 610098bb395a517dbba9d8cb2d8f168938bbb361
Author: Jinbao Chen <[email protected]>
AuthorDate: Mon Jan 5 23:56:33 2026 +0800
Use variable in sql file
---
src/test/regress/sql/cbdb_parallel.sql | 10 +++++-----
src/test/regress/sql/qp_gist_indexes2.sql | 13 +++++++------
src/test/regress/sql/qp_regexp.sql | 2 +-
src/test/regress/sql/session_reset.sql | 2 +-
4 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/test/regress/sql/cbdb_parallel.sql
b/src/test/regress/sql/cbdb_parallel.sql
index e8e070adbab..18996eb8107 100644
--- a/src/test/regress/sql/cbdb_parallel.sql
+++ b/src/test/regress/sql/cbdb_parallel.sql
@@ -2,7 +2,7 @@
-- CBDB PARALLEL
-- Test CBDB style parallel plan.
-- GUCs shoule be set with local, do not disturb other parallel plans.
--- Should not use force_parallel_mode as it will ignore plan and check results
only.
+-- Should not use debug_parallel_query as it will ignore plan and check
results only.
-- We want to check plan in this file!
-- If there is need to do that, set it local inside a transaction.
-- Set optimizer off in this file, ORCA parallel is not supported.
@@ -31,7 +31,7 @@
-- 12 CdbLocusType_HashedWorkers
--
--
-set debug_parallel_query=regress;
+set debug_parallel_query=off;
set optimizer = off;
create schema test_parallel;
@@ -220,7 +220,7 @@ set local enable_parallel = on;
create index on t1(c2);
insert into t1 select i, i from generate_series(1, 10000000) i;
analyze t1;
-set local force_parallel_mode = 1;
+set local debug_parallel_query=regress;
set local enable_seqscan = off;
explain(locus, costs off) select c2 from t1;
-- results check
@@ -897,7 +897,7 @@ abort;
begin;
set local optimizer=off;
set local enable_parallel=on;
-set local force_parallel_mode =1 ;
+set local debug_parallel_query=regress;
set local min_parallel_table_scan_size = 0;
create table semi_t1 (c1 integer) with(parallel_workers=2) distributed
randomly;
create table semi_t2 (c2 integer) with(parallel_workers=2) distributed
randomly;
@@ -991,5 +991,5 @@ drop schema test_parallel cascade;
-- end_ignore
reset gp_appendonly_insert_files;
-reset force_parallel_mode;
+reset debug_parallel_query;
reset optimizer;
diff --git a/src/test/regress/sql/qp_gist_indexes2.sql
b/src/test/regress/sql/qp_gist_indexes2.sql
index 94ebfeb10cc..87df228431e 100644
--- a/src/test/regress/sql/qp_gist_indexes2.sql
+++ b/src/test/regress/sql/qp_gist_indexes2.sql
@@ -30,9 +30,10 @@ language plpython3u;
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; le [...]
)
DISTRIBUTED BY (id);
-
+\getenv abs_srcdir PG_ABS_SRCDIR
+\set PropertyInfo_file :abs_srcdir '/data/PropertyInfo.txt'
COPY GistTable1 FROM
-'@abs_srcdir@/data/PropertyInfo.txt'
+:'PropertyInfo_file'
CSV
;
ANALYZE GistTable1;
@@ -472,7 +473,7 @@ CREATE TABLE GistTable1 ( id INTEGER, owner VARCHAR,
description VARCHAR, proper
DISTRIBUTED BY (id);
COPY GistTable1 FROM
-'@abs_srcdir@/data/PropertyInfo.txt'
+:'PropertyInfo_file'
CSV
;
-- ----------------------------------------------------------------------
@@ -871,7 +872,7 @@ CREATE TABLE GistTable1 ( id INTEGER, owner VARCHAR,
description VARCHAR, proper
DISTRIBUTED BY (id);
COPY GistTable1 FROM
-'@abs_srcdir@/data/PropertyInfo.txt'
+:'PropertyInfo_file'
CSV
;
-- ----------------------------------------------------------------------
@@ -1271,7 +1272,7 @@ CREATE TABLE GistTable1 ( id INTEGER, owner VARCHAR,
description VARCHAR, proper
DISTRIBUTED BY (id);
COPY GistTable1 FROM
-'@abs_srcdir@/data/PropertyInfo.txt'
+:'PropertyInfo_file'
CSV
;
-- ----------------------------------------------------------------------
@@ -1672,7 +1673,7 @@ CREATE TABLE GistTable1 ( id INTEGER, owner VARCHAR,
description VARCHAR, proper
DISTRIBUTED BY (id);
COPY GistTable1 FROM
-'@abs_srcdir@/data/PropertyInfo.txt'
+:'PropertyInfo_file'
CSV
;
-- ----------------------------------------------------------------------
diff --git a/src/test/regress/sql/qp_regexp.sql
b/src/test/regress/sql/qp_regexp.sql
index 99f87f7f7fe..a3553a8f49a 100644
--- a/src/test/regress/sql/qp_regexp.sql
+++ b/src/test/regress/sql/qp_regexp.sql
@@ -27,7 +27,7 @@ distributed by (lname);
\getenv abs_srcdir PG_ABS_SRCDIR
\set phone_book_file :abs_srcdir '/data/phone_book.txt'
-\copy public.phone_book from :'phone_book_file' delimiter as '|'
+copy public.phone_book from :'phone_book_file' delimiter as '|'
drop table if exists phone_book_substr;
diff --git a/src/test/regress/sql/session_reset.sql
b/src/test/regress/sql/session_reset.sql
index d78ff4d7dc1..dd53cf60945 100644
--- a/src/test/regress/sql/session_reset.sql
+++ b/src/test/regress/sql/session_reset.sql
@@ -1,7 +1,7 @@
set log_min_messages to ERROR;
\getenv abs_builddir ABS_BUILDDIR
-\set regress_dll :abs_builddir'/regress.so'
+\set regress_dll :abs_builddir '/regress.so'
CREATE OR REPLACE FUNCTION gp_execute_on_server(content int, query text)
returns text
language C as :'regress_dll', 'gp_execute_on_server';
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]