diff --git a/crates/lib-core/src/dialects/base.rs b/crates/lib-core/src/dialects/base.rs index 8fad02c1..d265e211 100644 --- a/crates/lib-core/src/dialects/base.rs +++ b/crates/lib-core/src/dialects/base.rs @@ -69,6 +69,7 @@ impl Dialect { .unwrap_or_else(|| panic!("Failed to get mutable reference for {name}")) { DialectElementType::Matchable(matchable) => { + println!("Replacing grammar {:?} with new grammar.", matchable); matchable.as_node_matcher().unwrap().match_grammar = match_grammar; } DialectElementType::SegmentGenerator(_) => { diff --git a/crates/lib-dialects/src/databricks.rs b/crates/lib-dialects/src/databricks.rs index 12392c85..88ba0fc7 100644 --- a/crates/lib-dialects/src/databricks.rs +++ b/crates/lib-dialects/src/databricks.rs @@ -259,7 +259,7 @@ pub fn dialect() -> Dialect { // Only difference between this and the SparkSQL version: // - `LIKE` keyword is optional databricks.replace_grammar( - "ShowViewsGrammar".into(), + "ShowViewsStatement".into(), Sequence::new(vec_of_erased![ Ref::keyword("VIEWS"), Sequence::new(vec_of_erased![one_of(vec_of_erased![ @@ -278,6 +278,7 @@ pub fn dialect() -> Dialect { .to_matchable() .into(), ); + // TODO Missing Show Object Grammar databricks.replace_grammar( "NotNullGrammar".into(),