Skip to content

Commit 32afd27

Browse files
committed
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]
1 parent a649174 commit 32afd27

File tree

7 files changed

+19
-49
lines changed

7 files changed

+19
-49
lines changed

gpMgmt/bin/gppylib/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def deleteBlock(fileName,beginPattern, endPattern):
290290
print(("IOERROR", IOError))
291291
sys.exit()
292292
else:
293-
print("***********%s file does not exits"%(fileName))
293+
print("***********%s file does not exist"%(fileName))
294294

295295
def make_inf_hosts(hp, hstart, hend, istart, iend, hf=None):
296296
hfArr = []

src/backend/access/appendonly/appendonlyblockdirectory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ load_last_minipage(AppendOnlyBlockDirectory *blockDirectory,
12851285
* find_minipage_entry
12861286
*
12871287
* Find the minipage entry that covers the given rowNum.
1288-
* If such an entry does not exists, -1 is returned. Otherwise
1288+
* If such an entry does not exist, -1 is returned. Otherwise
12891289
* the index to such an entry in the minipage array is returned.
12901290
*/
12911291
static int

src/backend/gporca/server/include/unittest/gpopt/operators/CExpressionPreprocessorTest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class CExpressionPreprocessorTest
5959
// check if a given expression has a subquery exists node
6060
static BOOL FHasSubqueryExists(CExpression *pexpr);
6161

62-
// check if a given expression has a subquery not exitst node
62+
// check if a given expression has a subquery not exists node
6363
static BOOL FHasSubqueryNotExists(CExpression *pexpr);
6464

6565
// check if a given expression has an ALL subquery

src/backend/utils/misc/guc_gp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5522,7 +5522,7 @@ check_hot_dr(bool *newval, void **extra, GucSource source)
55225522
if (*newval && IS_QUERY_DISPATCHER() && !checkGpSegConfigFtsFiles())
55235523
ereport(ERROR,
55245524
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
5525-
errmsg("cannot enable \"hot_dr\" since DR cluster segment configuration file does not exits")));
5525+
errmsg("cannot enable \"hot_dr\" since DR cluster segment configuration file does not exist")));
55265526

55275527
return true;
55285528
}

src/test/regress/expected/tpcds_q04.out

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ SET default_table_access_method = ao_column;
2020
--
2121
-- Name: catalog_sales; Type: TABLE; Schema: cte_bug; Owner: -
2222
--
23-
DROP TABLE IF EXITS cte_bug.catalog_sales;
24-
ERROR: syntax error at or near "EXITS"
25-
LINE 1: DROP TABLE IF EXITS cte_bug.catalog_sales;
26-
^
23+
DROP TABLE IF EXISTS cte_bug.catalog_sales;
2724
CREATE TABLE cte_bug.catalog_sales (
2825
cs_sold_date_sk integer,
2926
cs_sold_time_sk integer,
@@ -98,10 +95,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
9895
--
9996
-- Name: customer; Type: TABLE; Schema: cte_bug; Owner: -
10097
--
101-
DROP TABLE IF EXITS cte_bug.customer;
102-
ERROR: syntax error at or near "EXITS"
103-
LINE 1: DROP TABLE IF EXITS cte_bug.customer;
104-
^
98+
DROP TABLE IF EXISTS cte_bug.customer;
10599
CREATE TABLE cte_bug.customer (
106100
c_customer_sk integer NOT NULL,
107101
c_customer_id character varying(16) NOT NULL,
@@ -144,10 +138,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
144138
--
145139
-- Name: date_dim; Type: TABLE; Schema: cte_bug; Owner: -
146140
--
147-
DROP TABLE IF EXITS cte_bug.date_dim;
148-
ERROR: syntax error at or near "EXITS"
149-
LINE 1: DROP TABLE IF EXITS cte_bug.date_dim;
150-
^
141+
DROP TABLE IF EXISTS cte_bug.date_dim;
151142
CREATE TABLE cte_bug.date_dim (
152143
d_date_sk integer NOT NULL,
153144
d_date_id character varying(16) NOT NULL,
@@ -210,10 +201,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
210201
--
211202
-- Name: store_sales; Type: TABLE; Schema: cte_bug; Owner: -
212203
--
213-
DROP TABLE IF EXITS cte_bug.store_sales;
214-
ERROR: syntax error at or near "EXITS"
215-
LINE 1: DROP TABLE IF EXITS cte_bug.store_sales;
216-
^
204+
DROP TABLE IF EXISTS cte_bug.store_sales;
217205
CREATE TABLE cte_bug.store_sales (
218206
ss_sold_date_sk integer,
219207
ss_sold_time_sk integer,
@@ -266,10 +254,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
266254
--
267255
-- Name: web_sales; Type: TABLE; Schema: cte_bug; Owner: -
268256
--
269-
DROP TABLE IF EXITS cte_bug.web_sales;
270-
ERROR: syntax error at or near "EXITS"
271-
LINE 1: DROP TABLE IF EXITS cte_bug.web_sales;
272-
^
257+
DROP TABLE IF EXISTS cte_bug.web_sales;
273258
CREATE TABLE cte_bug.web_sales (
274259
ws_sold_date_sk integer,
275260
ws_sold_time_sk integer,

src/test/regress/expected/tpcds_q04_optimizer.out

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ SET default_table_access_method = ao_column;
2020
--
2121
-- Name: catalog_sales; Type: TABLE; Schema: cte_bug; Owner: -
2222
--
23-
DROP TABLE IF EXITS cte_bug.catalog_sales;
24-
ERROR: syntax error at or near "EXITS"
25-
LINE 1: DROP TABLE IF EXITS cte_bug.catalog_sales;
26-
^
23+
DROP TABLE IF EXISTS cte_bug.catalog_sales;
2724
CREATE TABLE cte_bug.catalog_sales (
2825
cs_sold_date_sk integer,
2926
cs_sold_time_sk integer,
@@ -98,10 +95,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
9895
--
9996
-- Name: customer; Type: TABLE; Schema: cte_bug; Owner: -
10097
--
101-
DROP TABLE IF EXITS cte_bug.customer;
102-
ERROR: syntax error at or near "EXITS"
103-
LINE 1: DROP TABLE IF EXITS cte_bug.customer;
104-
^
98+
DROP TABLE IF EXISTS cte_bug.customer;
10599
CREATE TABLE cte_bug.customer (
106100
c_customer_sk integer NOT NULL,
107101
c_customer_id character varying(16) NOT NULL,
@@ -144,10 +138,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
144138
--
145139
-- Name: date_dim; Type: TABLE; Schema: cte_bug; Owner: -
146140
--
147-
DROP TABLE IF EXITS cte_bug.date_dim;
148-
ERROR: syntax error at or near "EXITS"
149-
LINE 1: DROP TABLE IF EXITS cte_bug.date_dim;
150-
^
141+
DROP TABLE IF EXISTS cte_bug.date_dim;
151142
CREATE TABLE cte_bug.date_dim (
152143
d_date_sk integer NOT NULL,
153144
d_date_id character varying(16) NOT NULL,
@@ -210,10 +201,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
210201
--
211202
-- Name: store_sales; Type: TABLE; Schema: cte_bug; Owner: -
212203
--
213-
DROP TABLE IF EXITS cte_bug.store_sales;
214-
ERROR: syntax error at or near "EXITS"
215-
LINE 1: DROP TABLE IF EXITS cte_bug.store_sales;
216-
^
204+
DROP TABLE IF EXISTS cte_bug.store_sales;
217205
CREATE TABLE cte_bug.store_sales (
218206
ss_sold_date_sk integer,
219207
ss_sold_time_sk integer,
@@ -266,10 +254,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
266254
--
267255
-- Name: web_sales; Type: TABLE; Schema: cte_bug; Owner: -
268256
--
269-
DROP TABLE IF EXITS cte_bug.web_sales;
270-
ERROR: syntax error at or near "EXITS"
271-
LINE 1: DROP TABLE IF EXITS cte_bug.web_sales;
272-
^
257+
DROP TABLE IF EXISTS cte_bug.web_sales;
273258
CREATE TABLE cte_bug.web_sales (
274259
ws_sold_date_sk integer,
275260
ws_sold_time_sk integer,

src/test/regress/sql/tpcds_q04.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ SET default_table_access_method = ao_column;
1919
--
2020
-- Name: catalog_sales; Type: TABLE; Schema: cte_bug; Owner: -
2121
--
22-
DROP TABLE IF EXITS cte_bug.catalog_sales;
22+
DROP TABLE IF EXISTS cte_bug.catalog_sales;
2323

2424
CREATE TABLE cte_bug.catalog_sales (
2525
cs_sold_date_sk integer,
@@ -98,7 +98,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
9898
-- Name: customer; Type: TABLE; Schema: cte_bug; Owner: -
9999
--
100100

101-
DROP TABLE IF EXITS cte_bug.customer;
101+
DROP TABLE IF EXISTS cte_bug.customer;
102102

103103
CREATE TABLE cte_bug.customer (
104104
c_customer_sk integer NOT NULL,
@@ -144,7 +144,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
144144
--
145145
-- Name: date_dim; Type: TABLE; Schema: cte_bug; Owner: -
146146
--
147-
DROP TABLE IF EXITS cte_bug.date_dim;
147+
DROP TABLE IF EXISTS cte_bug.date_dim;
148148

149149
CREATE TABLE cte_bug.date_dim (
150150
d_date_sk integer NOT NULL,
@@ -210,7 +210,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
210210
--
211211
-- Name: store_sales; Type: TABLE; Schema: cte_bug; Owner: -
212212
--
213-
DROP TABLE IF EXITS cte_bug.store_sales;
213+
DROP TABLE IF EXISTS cte_bug.store_sales;
214214

215215
CREATE TABLE cte_bug.store_sales (
216216
ss_sold_date_sk integer,
@@ -266,7 +266,7 @@ WITH (appendonly = true, orientation = column, compresstype=zstd, compresslevel=
266266
--
267267
-- Name: web_sales; Type: TABLE; Schema: cte_bug; Owner: -
268268
--
269-
DROP TABLE IF EXITS cte_bug.web_sales;
269+
DROP TABLE IF EXISTS cte_bug.web_sales;
270270

271271
CREATE TABLE cte_bug.web_sales (
272272
ws_sold_date_sk integer,

0 commit comments

Comments
 (0)