Skip to content

Commit fb32fd5

Browse files
committed
Drop AST asserts and header comment in COPY GRANTS test
1 parent e1ce7c4 commit fb32fd5

1 file changed

Lines changed: 2 additions & 26 deletions

File tree

tests/sqlparser_snowflake.rs

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4766,11 +4766,6 @@ fn test_snowflake_create_view_copy_grants() {
47664766

47674767
#[test]
47684768
fn test_snowflake_create_view_copy_grants_after_columns() {
4769-
// Snowflake's documented placement for `COPY GRANTS` on `CREATE VIEW` is
4770-
// *after* the column list. Display normalizes to the pre-columns form
4771-
// already supported, so use `one_statement_parses_to` to assert the
4772-
// post-columns input is accepted and the AST flag is set.
4773-
// <https://docs.snowflake.com/en/sql-reference/sql/create-view#syntax>
47744769
let cases = [
47754770
(
47764771
"CREATE OR REPLACE VIEW v (a, b) COPY GRANTS AS SELECT a, b FROM t",
@@ -4786,28 +4781,9 @@ fn test_snowflake_create_view_copy_grants_after_columns() {
47864781
),
47874782
];
47884783
for (sql, parsed) in cases {
4789-
match snowflake().one_statement_parses_to(sql, parsed) {
4790-
Statement::CreateView(CreateView {
4791-
name,
4792-
copy_grants,
4793-
columns,
4794-
..
4795-
}) => {
4796-
assert_eq!("v", name.to_string());
4797-
assert!(copy_grants, "copy_grants should be true for {sql:?}");
4798-
assert!(!columns.is_empty(), "columns should be set for {sql:?}");
4799-
}
4800-
_ => unreachable!(),
4801-
}
4802-
}
4803-
4804-
// Baseline: the same query without COPY GRANTS must not flip the flag.
4805-
match snowflake().verified_stmt("CREATE OR REPLACE VIEW v (a) AS SELECT a FROM t") {
4806-
Statement::CreateView(CreateView { copy_grants, .. }) => {
4807-
assert!(!copy_grants);
4808-
}
4809-
_ => unreachable!(),
4784+
snowflake().one_statement_parses_to(sql, parsed);
48104785
}
4786+
snowflake().verified_stmt("CREATE OR REPLACE VIEW v (a) AS SELECT a FROM t");
48114787
}
48124788

48134789
#[test]

0 commit comments

Comments
 (0)