Skip to content

Commit

Permalink
fix: fix exits typos (#2772)
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu authored Nov 20, 2023
1 parent 91820a8 commit 730a3fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/sql/src/statements/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl CreateTable {
}

#[inline]
fn format_if_not_exits(&self) -> &str {
fn format_if_not_exists(&self) -> &str {
if self.if_not_exists {
"IF NOT EXISTS"
} else {
Expand Down Expand Up @@ -174,7 +174,7 @@ impl Display for Partitions {

impl Display for CreateTable {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
let if_not_exists = self.format_if_not_exits();
let if_not_exists = self.format_if_not_exists();
let name = &self.name;
let columns = format_list_indent!(self.columns);
let constraints = self.format_constraints();
Expand Down
4 changes: 2 additions & 2 deletions tests/cases/standalone/common/truncate/truncate.result
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TRUNCATE TABLE not_exits_table;
TRUNCATE TABLE not_exists_table;

Error: 4001(TableNotFound), Table not found: greptime.public.not_exits_table
Error: 4001(TableNotFound), Table not found: greptime.public.not_exists_table

CREATE TABLE monitor (host STRING, ts TIMESTAMP, cpu DOUBLE DEFAULT 0, memory DOUBLE, TIME INDEX (ts), PRIMARY KEY(host));

Expand Down
2 changes: 1 addition & 1 deletion tests/cases/standalone/common/truncate/truncate.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TRUNCATE TABLE not_exits_table;
TRUNCATE TABLE not_exists_table;

CREATE TABLE monitor (host STRING, ts TIMESTAMP, cpu DOUBLE DEFAULT 0, memory DOUBLE, TIME INDEX (ts), PRIMARY KEY(host));

Expand Down

0 comments on commit 730a3fa

Please sign in to comment.