We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a496f78 commit 3f4d5f9Copy full SHA for 3f4d5f9
src/ast/mod.rs
@@ -4858,7 +4858,9 @@ impl fmt::Display for Statement {
4858
if matches!(options, CreateTableOptions::Options(_)) {
4859
write!(f, " {options}")?;
4860
}
4861
- write!(f, " AS {query}")?;
+ f.write_str(" AS")?;
4862
+ SpaceOrNewline.fmt(f)?;
4863
+ query.fmt(f)?;
4864
if *with_no_schema_binding {
4865
write!(f, " WITH NO SCHEMA BINDING")?;
4866
tests/pretty_print.rs
@@ -264,7 +264,6 @@ CREATE TABLE my_table (
264
265
266
#[test]
267
-#[ignore = "https://github.com/apache/datafusion-sqlparser-rs/issues/1850"]
268
fn test_pretty_print_create_view() {
269
assert_eq!(
270
prettify("CREATE VIEW my_view AS SELECT a, b FROM my_table WHERE x > 0"),
0 commit comments