mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
pretty-print CREATE VIEW statements (#1855)
This commit is contained in:
parent
a496f78803
commit
3f4d5f96ee
2 changed files with 3 additions and 2 deletions
|
@ -4858,7 +4858,9 @@ impl fmt::Display for Statement {
|
|||
if matches!(options, CreateTableOptions::Options(_)) {
|
||||
write!(f, " {options}")?;
|
||||
}
|
||||
write!(f, " AS {query}")?;
|
||||
f.write_str(" AS")?;
|
||||
SpaceOrNewline.fmt(f)?;
|
||||
query.fmt(f)?;
|
||||
if *with_no_schema_binding {
|
||||
write!(f, " WITH NO SCHEMA BINDING")?;
|
||||
}
|
||||
|
|
|
@ -264,7 +264,6 @@ CREATE TABLE my_table (
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "https://github.com/apache/datafusion-sqlparser-rs/issues/1850"]
|
||||
fn test_pretty_print_create_view() {
|
||||
assert_eq!(
|
||||
prettify("CREATE VIEW my_view AS SELECT a, b FROM my_table WHERE x > 0"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue