Skip to content

Commit 3e4d49c

Browse files
committed
Expand test case for ClickHouse table-function SETTINGS clause
1 parent f068551 commit 3e4d49c

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

tests/sqlparser_clickhouse.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ fn parse_create_table_on_commit_and_as_query() {
10931093

10941094
#[test]
10951095
fn parse_select_table_function_settings() {
1096-
let sql = r#"SELECT * FROM table_function(arg, SETTINGS setting = 3)"#;
1096+
let sql = r#"SELECT * FROM table_function(arg, SETTINGS s0 = 3, s1 = 's')"#;
10971097
match clickhouse_and_generic().verified_stmt(sql) {
10981098
Statement::Query(q) => {
10991099
let from = &q.body.as_select().unwrap().from;
@@ -1110,10 +1110,16 @@ fn parse_select_table_function_settings() {
11101110
);
11111111
assert_eq!(
11121112
args.settings,
1113-
Some(vec![Setting {
1114-
key: "setting".into(),
1115-
value: Value::Number("3".into(), false)
1116-
}])
1113+
Some(vec![
1114+
Setting {
1115+
key: "s0".into(),
1116+
value: Value::Number("3".into(), false)
1117+
},
1118+
Setting {
1119+
key: "s1".into(),
1120+
value: Value::SingleQuotedString("s".into())
1121+
}
1122+
])
11171123
)
11181124
}
11191125
_ => unreachable!(),

0 commit comments

Comments
 (0)