Skip to content

Commit

Permalink
fix: enhance ColumnOption::DefaultValue formatting for string values (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu authored Jul 4, 2024
1 parent 8399dca commit b5c6c72
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests-fuzz/src/ir/create_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ impl Display for ColumnOption {
ColumnOption::Null => write!(f, "NULL"),
ColumnOption::NotNull => write!(f, "NOT NULL"),
ColumnOption::DefaultFn(s) => write!(f, "DEFAULT {}", s),
ColumnOption::DefaultValue(s) => write!(f, "DEFAULT {}", s),
ColumnOption::DefaultValue(s) => match s {
Value::String(value) => {
write!(f, "DEFAULT \'{}\'", value.as_utf8())
}
_ => write!(f, "DEFAULT {}", s),
},
ColumnOption::TimeIndex => write!(f, "TIME INDEX"),
ColumnOption::PrimaryKey => write!(f, "PRIMARY KEY"),
}
Expand Down

0 comments on commit b5c6c72

Please sign in to comment.