Skip to content

Commit 73932f2

Browse files
Fix CREATE TABLE display after rebase
1 parent 0b5274c commit 73932f2

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/ast/ddl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3105,7 +3105,7 @@ impl fmt::Display for CreateTable {
31053105
// `CREATE TABLE t (a INT) AS SELECT a from t2`
31063106
write!(
31073107
f,
3108-
"CREATE {or_replace}{external}{global}{temporary}{unlogged}{transient}{volatile}{dynamic}{iceberg}{snapshot}TABLE {if_not_exists}{name}",
3108+
"CREATE {or_replace}{external}{multiset}{global}{temporary}{unlogged}{transient}{volatile}{dynamic}{iceberg}{snapshot}TABLE {if_not_exists}{name}",
31093109
or_replace = if self.or_replace { "OR REPLACE " } else { "" },
31103110
external = if self.external { "EXTERNAL " } else { "" },
31113111
snapshot = if self.snapshot { "SNAPSHOT " } else { "" },

src/parser/mod.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5146,8 +5146,10 @@ impl<'a> Parser<'a> {
51465146
self.parse_create_snapshot_table().map(Into::into)
51475147
} else if self.peek_keywords(&[Keyword::UNLOGGED, Keyword::TABLE]) {
51485148
self.expect_keywords(&[Keyword::UNLOGGED, Keyword::TABLE])?;
5149-
self.parse_create_table(or_replace, temporary, true, global, transient)
5150-
.map(Into::into)
5149+
let mut create_table = self
5150+
.parse_create_table(or_replace, temporary, global, transient, volatile, multiset)?;
5151+
create_table.unlogged = true;
5152+
Ok(create_table.into())
51515153
} else if self.parse_keyword(Keyword::TABLE) {
51525154
self.parse_create_table(or_replace, temporary, global, transient, volatile, multiset)
51535155
.map(Into::into)
@@ -8487,7 +8489,6 @@ impl<'a> Parser<'a> {
84878489
&mut self,
84888490
or_replace: bool,
84898491
temporary: bool,
8490-
unlogged: bool,
84918492
global: Option<bool>,
84928493
transient: bool,
84938494
volatile: bool,
@@ -8669,7 +8670,7 @@ impl<'a> Parser<'a> {
86698670

86708671
Ok(CreateTableBuilder::new(table_name)
86718672
.temporary(temporary)
8672-
.unlogged(unlogged)
8673+
.unlogged(false)
86738674
.columns(columns)
86748675
.constraints(constraints)
86758676
.or_replace(or_replace)

0 commit comments

Comments
 (0)