Skip to content

Commit f6429ae

Browse files
Dragonliu2018b41sh
andauthored
feat: support map lambda functions (#16683)
* feat: support map lambda functions * fix bugs and impl map_filter * support a column from table case * support json map lambda functions * remove log * fix typos * fix tests --------- Co-authored-by: baishen <[email protected]>
1 parent 4f79166 commit f6429ae

File tree

6 files changed

+813
-57
lines changed

6 files changed

+813
-57
lines changed

src/query/ast/tests/it/parser.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,9 @@ fn test_expr() {
12251225
r#"ARRAY_FILTER(col, y -> y % 2 = 0)"#,
12261226
r#"(current_timestamp, current_timestamp(), now())"#,
12271227
r#"ARRAY_REDUCE([1,2,3], (acc,t) -> acc + t)"#,
1228+
r#"MAP_FILTER({1:1,2:2,3:4}, (k, v) -> k > v)"#,
1229+
r#"MAP_TRANSFORM_KEYS({1:10,2:20,3:30}, (k, v) -> k + 1)"#,
1230+
r#"MAP_TRANSFORM_VALUES({1:10,2:20,3:30}, (k, v) -> v + 1)"#,
12281231
];
12291232

12301233
for case in cases {

0 commit comments

Comments
 (0)