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 f4b7c5faee0 Fix some answer files
f4b7c5faee0 is described below

commit f4b7c5faee076c78f2424fbaba1ede97a6f125f9
Author: Jinbao Chen <[email protected]>
AuthorDate: Sat Jan 3 19:48:36 2026 +0800

    Fix some answer files
---
 .../expected/external_table_persistent_error_log.out | 20 ++++++++++++++++----
 .../regress/expected/external_table_union_all.out    |  9 +++++++--
 .../sql/external_table_persistent_error_log.sql      | 14 +++++++++-----
 src/test/regress/sql/external_table_union_all.sql    |  9 +++++++--
 4 files changed, 39 insertions(+), 13 deletions(-)

diff --git a/src/test/regress/expected/external_table_persistent_error_log.out 
b/src/test/regress/expected/external_table_persistent_error_log.out
index 149db731f6f..b1fec1b38e8 100644
--- a/src/test/regress/expected/external_table_persistent_error_log.out
+++ b/src/test/regress/expected/external_table_persistent_error_log.out
@@ -24,10 +24,20 @@
 -- s/Found.+//
 --
 -- end_matchsubs
+-- start_ignore
+DROP EXTERNAL TABLE IF EXISTS ext_error_persistent;
+NOTICE:  foreign table "ext_error_persistent" does not exist, skipping
+DROP EXTERNAL TABLE IF EXISTS ext_bytea;
+NOTICE:  foreign table "ext_bytea" does not exist, skipping
+-- end_ignore
 SET optimizer_trace_fallback=on;
-COPY (VALUES('1,2'),('1,2,3'),('1,'),('1')) TO 
'@abs_srcdir@/data/tableerr.csv';
+\getenv abs_srcdir PG_ABS_SRCDIR
+\getenv hostname PG_HOSTNAME
+\set tableerr_file :abs_srcdir '/data/tableerr.csv'
+COPY (VALUES('1,2'),('1,2,3'),('1,'),('1')) TO :'tableerr_file';
+\set tableerr_file2 'file://' :hostname :abs_srcdir '/data/tableerr.csv'
 create external table ext_error_persistent(a int, b int)
-location ('file://@hostname@@abs_srcdir@/data/tableerr.csv')
+location (:'tableerr_file2')
 format 'csv'
 log errors persistently segment reject limit 10;
 select * from ext_error_persistent;
@@ -164,7 +174,7 @@ SELECT relname, linenum, errmsg FROM 
gp_read_persistent_error_log('ext_error_per
 
 -- with out the error_log_persistent option, which will use normal error log.
 create external table ext_error_persistent(a int, b int)
-location ('file://@hostname@@abs_srcdir@/data/tableerr.csv')
+location (:'tableerr_file2')
 format 'csv'
 log errors segment reject limit 10;
 select * from ext_error_persistent;
@@ -214,9 +224,10 @@ SELECT relname, linenum, errmsg FROM 
gp_read_persistent_error_log('ext_error_per
 ---------+---------+--------
 (0 rows)
 
+\set bytea_file 'file://' :hostname :abs_srcdir '/data/bytea.data'
 CREATE EXTERNAL TABLE ext_bytea (id int, content bytea)
 LOCATION (
-    'file://@hostname@@abs_srcdir@/data/bytea.data'
+    :'bytea_file'
 ) FORMAT 'CSV'
 OPTIONS (error_log_persistent 'true')
 LOG ERRORS SEGMENT REJECT LIMIT 5;
@@ -247,3 +258,4 @@ SELECT relname, linenum, errmsg FROM 
gp_read_persistent_error_log('ext_bytea');
 (0 rows)
 
 \! rm @abs_srcdir@/data/tableerr.csv
+rm: cannot remove '@abs_srcdir@/data/tableerr.csv': No such file or directory
diff --git a/src/test/regress/expected/external_table_union_all.out 
b/src/test/regress/expected/external_table_union_all.out
index 40e58ea6fd4..8ba112f947a 100644
--- a/src/test/regress/expected/external_table_union_all.out
+++ b/src/test/regress/expected/external_table_union_all.out
@@ -1,10 +1,15 @@
 SET optimizer_trace_fallback=on;
 -- Test external table as left child of union all with replicated table
+\getenv abs_srcdir PG_ABS_SRCDIR
+\getenv hostname PG_HOSTNAME
+\set location1_file 'file://' :hostname :abs_srcdir '/data/location1.csv'
+\set location2_file 'file://' :hostname :abs_srcdir '/data/location2.csv'
+\set location3_file 'file://' :hostname :abs_srcdir '/data/location3.csv'
 CREATE EXTERNAL TABLE multilocation_external_table(a INTEGER)
-location ('file://@hostname@@abs_srcdir@/data/location1.csv', 
'file://@hostname@@abs_srcdir@/data/location2.csv', 
'file://@hostname@@abs_srcdir@/data/location3.csv')
+location (:'location1_file', :'location2_file', :'location3_file')
 ON ALL FORMAT 'text';
 CREATE EXTERNAL TABLE one_external_table(a INTEGER)
-location ('file://@hostname@@abs_srcdir@/data/location2.csv')
+location (:'location2_file')
 ON SEGMENT 2 FORMAT 'text';
 CREATE TABLE simple_replicated_table(a integer) DISTRIBUTED REPLICATED;
 INSERT INTO simple_replicated_table VALUES (1);
diff --git a/src/test/regress/sql/external_table_persistent_error_log.sql 
b/src/test/regress/sql/external_table_persistent_error_log.sql
index afa97b8eba9..f1a8c3d268d 100644
--- a/src/test/regress/sql/external_table_persistent_error_log.sql
+++ b/src/test/regress/sql/external_table_persistent_error_log.sql
@@ -30,11 +30,14 @@ DROP EXTERNAL TABLE IF EXISTS ext_error_persistent;
 DROP EXTERNAL TABLE IF EXISTS ext_bytea;
 -- end_ignore
 SET optimizer_trace_fallback=on;
+\getenv abs_srcdir PG_ABS_SRCDIR
+\getenv hostname PG_HOSTNAME
+\set tableerr_file :abs_srcdir '/data/tableerr.csv'
+COPY (VALUES('1,2'),('1,2,3'),('1,'),('1')) TO :'tableerr_file';
 
-COPY (VALUES('1,2'),('1,2,3'),('1,'),('1')) TO 
'@abs_srcdir@/data/tableerr.csv';
-
+\set tableerr_file2 'file://' :hostname :abs_srcdir '/data/tableerr.csv'
 create external table ext_error_persistent(a int, b int)
-location ('file://@hostname@@abs_srcdir@/data/tableerr.csv')
+location (:'tableerr_file2')
 format 'csv'
 log errors persistently segment reject limit 10;
 
@@ -76,7 +79,7 @@ SELECT relname, linenum, errmsg FROM 
gp_read_persistent_error_log('ext_error_per
 
 -- with out the error_log_persistent option, which will use normal error log.
 create external table ext_error_persistent(a int, b int)
-location ('file://@hostname@@abs_srcdir@/data/tableerr.csv')
+location (:'tableerr_file2')
 format 'csv'
 log errors segment reject limit 10;
 
@@ -92,9 +95,10 @@ SELECT relname, linenum, errmsg FROM 
gp_read_persistent_error_log('ext_error_per
 SELECT gp_truncate_persistent_error_log('ext_error_persistent');
 SELECT relname, linenum, errmsg FROM 
gp_read_persistent_error_log('ext_error_persistent');
 
+\set bytea_file 'file://' :hostname :abs_srcdir '/data/bytea.data'
 CREATE EXTERNAL TABLE ext_bytea (id int, content bytea)
 LOCATION (
-    'file://@hostname@@abs_srcdir@/data/bytea.data'
+    :'bytea_file'
 ) FORMAT 'CSV'
 OPTIONS (error_log_persistent 'true')
 LOG ERRORS SEGMENT REJECT LIMIT 5;
diff --git a/src/test/regress/sql/external_table_union_all.sql 
b/src/test/regress/sql/external_table_union_all.sql
index edbd8af0e34..dcb038b4a1a 100644
--- a/src/test/regress/sql/external_table_union_all.sql
+++ b/src/test/regress/sql/external_table_union_all.sql
@@ -1,10 +1,15 @@
 SET optimizer_trace_fallback=on;
 -- Test external table as left child of union all with replicated table
+\getenv abs_srcdir PG_ABS_SRCDIR
+\getenv hostname PG_HOSTNAME
+\set location1_file 'file://' :hostname :abs_srcdir '/data/location1.csv'
+\set location2_file 'file://' :hostname :abs_srcdir '/data/location2.csv'
+\set location3_file 'file://' :hostname :abs_srcdir '/data/location3.csv'
 CREATE EXTERNAL TABLE multilocation_external_table(a INTEGER)
-location ('file://@hostname@@abs_srcdir@/data/location1.csv', 
'file://@hostname@@abs_srcdir@/data/location2.csv', 
'file://@hostname@@abs_srcdir@/data/location3.csv')
+location (:'location1_file', :'location2_file', :'location3_file')
 ON ALL FORMAT 'text';
 CREATE EXTERNAL TABLE one_external_table(a INTEGER)
-location ('file://@hostname@@abs_srcdir@/data/location2.csv')
+location (:'location2_file')
 ON SEGMENT 2 FORMAT 'text';
 CREATE TABLE simple_replicated_table(a integer) DISTRIBUTED REPLICATED;
 INSERT INTO simple_replicated_table VALUES (1);


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to