This is an automated email from the ASF dual-hosted git repository.
avamingli pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push:
new 32afd2792d1 fix: correct EXITS typo to EXISTS in SQL and code
32afd2792d1 is described below
commit 32afd2792d1003d0a79a1b44e1716d0d8c5c2019
Author: Zhang Mingli <[email protected]>
AuthorDate: Thu Nov 13 15:26:24 2025 +0800
fix: correct EXITS typo to EXISTS in SQL and code
- Fix 'EXITS' to 'EXISTS' in DROP TABLE IF EXISTS statements
- Fix same typo in other code locations
The original error was causing SQL syntax failures:
ERROR: syntax error at or near "EXITS"
LINE 1: DROP TABLE IF EXITS cte_bug.store_sales;
^
Authored-by: Zhang Mingli [email protected]
---
gpMgmt/bin/gppylib/utils.py | 2 +-
.../access/appendonly/appendonlyblockdirectory.c | 2 +-
.../gpopt/operators/CExpressionPreprocessorTest.h | 2 +-
src/backend/utils/misc/guc_gp.c | 2 +-
src/test/regress/expected/tpcds_q04.out | 25 +++++-----------------
src/test/regress/expected/tpcds_q04_optimizer.out | 25 +++++-----------------
src/test/regress/sql/tpcds_q04.sql | 10 ++++-----
7 files changed, 19 insertions(+), 49 deletions(-)
diff --git a/gpMgmt/bin/gppylib/utils.py b/gpMgmt/bin/gppylib/utils.py
index fead818d3ac..1adb1e68cdc 100644
--- a/gpMgmt/bin/gppylib/utils.py
+++ b/gpMgmt/bin/gppylib/utils.py
@@ -290,7 +290,7 @@ def deleteBlock(fileName,beginPattern, endPattern):
print(("IOERROR", IOError))
sys.exit()
else:
- print("***********%s file does not exits"%(fileName))
+ print("***********%s file does not exist"%(fileName))
def make_inf_hosts(hp, hstart, hend, istart, iend, hf=None):
hfArr = []
diff --git a/src/backend/access/appendonly/appendonlyblockdirectory.c
b/src/backend/access/appendonly/appendonlyblockdirectory.c
index 2f9a9f4522a..1e3e3cb4c0b 100644
--- a/src/backend/access/appendonly/appendonlyblockdirectory.c
+++ b/src/backend/access/appendonly/appendonlyblockdirectory.c
@@ -1285,7 +1285,7 @@ load_last_minipage(AppendOnlyBlockDirectory
*blockDirectory,
* find_minipage_entry
*
* Find the minipage entry that covers the given rowNum.
- * If such an entry does not exists, -1 is returned. Otherwise
+ * If such an entry does not exist, -1 is returned. Otherwise
* the index to such an entry in the minipage array is returned.
*/
static int
diff --git
a/src/backend/gporca/server/include/unittest/gpopt/operators/CExpressionPreprocessorTest.h
b/src/backend/gporca/server/include/unittest/gpopt/operators/CExpressionPreprocessorTest.h
index c87830560dc..462a656f9bc 100644
---
a/src/backend/gporca/server/include/unittest/gpopt/operators/CExpressionPreprocessorTest.h
+++
b/src/backend/gporca/server/include/unittest/gpopt/operators/CExpressionPreprocessorTest.h
@@ -59,7 +59,7 @@ private:
// check if a given expression has a subquery exists node
static BOOL FHasSubqueryExists(CExpression *pexpr);
- // check if a given expression has a subquery not exitst node
+ // check if a given expression has a subquery not exists node
static BOOL FHasSubqueryNotExists(CExpression *pexpr);
// check if a given expression has an ALL subquery
diff --git a/src/backend/utils/misc/guc_gp.c b/src/backend/utils/misc/guc_gp.c
index 891044157b9..4eb88be4220 100644
--- a/src/backend/utils/misc/guc_gp.c
+++ b/src/backend/utils/misc/guc_gp.c
@@ -5522,7 +5522,7 @@ check_hot_dr(bool *newval, void **extra, GucSource source)
if (*newval && IS_QUERY_DISPATCHER() && !checkGpSegConfigFtsFiles())
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("cannot enable \"hot_dr\" since DR
cluster segment configuration file does not exits")));
+ errmsg("cannot enable \"hot_dr\" since DR
cluster segment configuration file does not exist")));
return true;
}
diff --git a/src/test/regress/expected/tpcds_q04.out
b/src/test/regress/expected/tpcds_q04.out
index 2bdcd377f85..be34e94a761 100644
--- a/src/test/regress/expected/tpcds_q04.out
+++ b/src/test/regress/expected/tpcds_q04.out
@@ -20,10 +20,7 @@ SET default_table_access_method = ao_column;
--
-- Name: catalog_sales; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.catalog_sales;
-ERROR: syntax error at or near "EXITS"
-LINE 1: DROP TABLE IF EXITS cte_bug.catalog_sales;
- ^
+DROP TABLE IF EXISTS cte_bug.catalog_sales;
CREATE TABLE cte_bug.catalog_sales (
cs_sold_date_sk integer,
cs_sold_time_sk integer,
@@ -98,10 +95,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: customer; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.customer;
-ERROR: syntax error at or near "EXITS"
-LINE 1: DROP TABLE IF EXITS cte_bug.customer;
- ^
+DROP TABLE IF EXISTS cte_bug.customer;
CREATE TABLE cte_bug.customer (
c_customer_sk integer NOT NULL,
c_customer_id character varying(16) NOT NULL,
@@ -144,10 +138,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: date_dim; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.date_dim;
-ERROR: syntax error at or near "EXITS"
-LINE 1: DROP TABLE IF EXITS cte_bug.date_dim;
- ^
+DROP TABLE IF EXISTS cte_bug.date_dim;
CREATE TABLE cte_bug.date_dim (
d_date_sk integer NOT NULL,
d_date_id character varying(16) NOT NULL,
@@ -210,10 +201,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: store_sales; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.store_sales;
-ERROR: syntax error at or near "EXITS"
-LINE 1: DROP TABLE IF EXITS cte_bug.store_sales;
- ^
+DROP TABLE IF EXISTS cte_bug.store_sales;
CREATE TABLE cte_bug.store_sales (
ss_sold_date_sk integer,
ss_sold_time_sk integer,
@@ -266,10 +254,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: web_sales; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.web_sales;
-ERROR: syntax error at or near "EXITS"
-LINE 1: DROP TABLE IF EXITS cte_bug.web_sales;
- ^
+DROP TABLE IF EXISTS cte_bug.web_sales;
CREATE TABLE cte_bug.web_sales (
ws_sold_date_sk integer,
ws_sold_time_sk integer,
diff --git a/src/test/regress/expected/tpcds_q04_optimizer.out
b/src/test/regress/expected/tpcds_q04_optimizer.out
index d0d3b7688ef..15208a03b56 100644
--- a/src/test/regress/expected/tpcds_q04_optimizer.out
+++ b/src/test/regress/expected/tpcds_q04_optimizer.out
@@ -20,10 +20,7 @@ SET default_table_access_method = ao_column;
--
-- Name: catalog_sales; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.catalog_sales;
-ERROR: syntax error at or near "EXITS"
-LINE 1: DROP TABLE IF EXITS cte_bug.catalog_sales;
- ^
+DROP TABLE IF EXISTS cte_bug.catalog_sales;
CREATE TABLE cte_bug.catalog_sales (
cs_sold_date_sk integer,
cs_sold_time_sk integer,
@@ -98,10 +95,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: customer; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.customer;
-ERROR: syntax error at or near "EXITS"
-LINE 1: DROP TABLE IF EXITS cte_bug.customer;
- ^
+DROP TABLE IF EXISTS cte_bug.customer;
CREATE TABLE cte_bug.customer (
c_customer_sk integer NOT NULL,
c_customer_id character varying(16) NOT NULL,
@@ -144,10 +138,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: date_dim; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.date_dim;
-ERROR: syntax error at or near "EXITS"
-LINE 1: DROP TABLE IF EXITS cte_bug.date_dim;
- ^
+DROP TABLE IF EXISTS cte_bug.date_dim;
CREATE TABLE cte_bug.date_dim (
d_date_sk integer NOT NULL,
d_date_id character varying(16) NOT NULL,
@@ -210,10 +201,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: store_sales; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.store_sales;
-ERROR: syntax error at or near "EXITS"
-LINE 1: DROP TABLE IF EXITS cte_bug.store_sales;
- ^
+DROP TABLE IF EXISTS cte_bug.store_sales;
CREATE TABLE cte_bug.store_sales (
ss_sold_date_sk integer,
ss_sold_time_sk integer,
@@ -266,10 +254,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: web_sales; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.web_sales;
-ERROR: syntax error at or near "EXITS"
-LINE 1: DROP TABLE IF EXITS cte_bug.web_sales;
- ^
+DROP TABLE IF EXISTS cte_bug.web_sales;
CREATE TABLE cte_bug.web_sales (
ws_sold_date_sk integer,
ws_sold_time_sk integer,
diff --git a/src/test/regress/sql/tpcds_q04.sql
b/src/test/regress/sql/tpcds_q04.sql
index eaa50502e81..ea427b30076 100644
--- a/src/test/regress/sql/tpcds_q04.sql
+++ b/src/test/regress/sql/tpcds_q04.sql
@@ -19,7 +19,7 @@ SET default_table_access_method = ao_column;
--
-- Name: catalog_sales; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.catalog_sales;
+DROP TABLE IF EXISTS cte_bug.catalog_sales;
CREATE TABLE cte_bug.catalog_sales (
cs_sold_date_sk integer,
@@ -98,7 +98,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
-- Name: customer; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.customer;
+DROP TABLE IF EXISTS cte_bug.customer;
CREATE TABLE cte_bug.customer (
c_customer_sk integer NOT NULL,
@@ -144,7 +144,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: date_dim; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.date_dim;
+DROP TABLE IF EXISTS cte_bug.date_dim;
CREATE TABLE cte_bug.date_dim (
d_date_sk integer NOT NULL,
@@ -210,7 +210,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: store_sales; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.store_sales;
+DROP TABLE IF EXISTS cte_bug.store_sales;
CREATE TABLE cte_bug.store_sales (
ss_sold_date_sk integer,
@@ -266,7 +266,7 @@ WITH (appendonly = true, orientation = column,
compresstype=zstd, compresslevel=
--
-- Name: web_sales; Type: TABLE; Schema: cte_bug; Owner: -
--
-DROP TABLE IF EXITS cte_bug.web_sales;
+DROP TABLE IF EXISTS cte_bug.web_sales;
CREATE TABLE cte_bug.web_sales (
ws_sold_date_sk integer,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]