You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/sqpparser_clickhouse.rs
+70-20Lines changed: 70 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -18,36 +18,86 @@ mod test_utils;
18
18
19
19
use test_utils::*;
20
20
21
-
use sqlparser::ast::Expr::{Identifier,MapAccess};
21
+
use sqlparser::ast::Expr::{BinaryOp,Identifier,MapAccess};
22
+
use sqlparser::ast::Ident;
23
+
use sqlparser::ast::SelectItem::UnnamedExpr;
24
+
use sqlparser::ast::TableFactor::Table;
22
25
use sqlparser::ast::*;
23
26
24
27
use sqlparser::dialect::ClickHouseDialect;
25
28
26
29
#[test]
27
30
fnparse_map_access_expr(){
28
-
let sql = r#"SELECT string_values[indexOf(string_names, 'endpoint')] FROM foos"#;
31
+
let sql = r#"SELECT string_values[indexOf(string_names, 'endpoint')] FROM foos WHERE id = 'test' AND string_value[indexOf(string_name, 'app')] <> 'foo'"#;
29
32
let select = clickhouse().verified_only_select(sql);
0 commit comments