fix: fix exits typos (#2772)

This commit is contained in:
Weny Xu
2023-11-20 11:07:01 +09:00
committed by GitHub
parent 91820a8006
commit 730a3faa02
3 changed files with 5 additions and 5 deletions

View File

@@ -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 {
@@ -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();

View File

@@ -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));

View File

@@ -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));