Skip to content

Commit a3fb75b

Browse files
Ilson Roberto Balliego Juniorballiegojr
authored andcommitted
re-add tests in the common tests file
1 parent 53a1ccc commit a3fb75b

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

tests/sqlparser_common.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3453,9 +3453,14 @@ fn parse_create_table_as_table() {
34533453

34543454
#[test]
34553455
fn parse_create_table_on_cluster() {
3456+
let generic = TestedDialects {
3457+
dialects: vec![Box::new(GenericDialect {})],
3458+
options: None,
3459+
};
3460+
34563461
// Using single-quote literal to define current cluster
34573462
let sql = "CREATE TABLE t ON CLUSTER '{cluster}' (a INT, b INT)";
3458-
match verified_stmt(sql) {
3463+
match generic.verified_stmt(sql) {
34593464
Statement::CreateTable(CreateTable { on_cluster, .. }) => {
34603465
assert_eq!(on_cluster.unwrap(), "{cluster}".to_string());
34613466
}
@@ -3464,7 +3469,7 @@ fn parse_create_table_on_cluster() {
34643469

34653470
// Using explicitly declared cluster name
34663471
let sql = "CREATE TABLE t ON CLUSTER my_cluster (a INT, b INT)";
3467-
match verified_stmt(sql) {
3472+
match generic.verified_stmt(sql) {
34683473
Statement::CreateTable(CreateTable { on_cluster, .. }) => {
34693474
assert_eq!(on_cluster.unwrap(), "my_cluster".to_string());
34703475
}
@@ -3517,8 +3522,13 @@ fn parse_create_table_with_on_delete_on_update_2in_any_order() -> Result<(), Par
35173522

35183523
#[test]
35193524
fn parse_create_table_with_options() {
3525+
let generic = TestedDialects {
3526+
dialects: vec![Box::new(GenericDialect {})],
3527+
options: None,
3528+
};
3529+
35203530
let sql = "CREATE TABLE t (c INT) WITH (foo = 'bar', a = 123)";
3521-
match verified_stmt(sql) {
3531+
match generic.verified_stmt(sql) {
35223532
Statement::CreateTable(CreateTable { with_options, .. }) => {
35233533
assert_eq!(
35243534
vec![

0 commit comments

Comments
 (0)