Skip to content

Commit

Permalink
feat: support map lambda functions (#16683)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
Dragonliu2018 and b41sh authored Oct 28, 2024
1 parent 4f79166 commit f6429ae
Show file tree
Hide file tree
Showing 6 changed files with 813 additions and 57 deletions.
3 changes: 3 additions & 0 deletions src/query/ast/tests/it/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,9 @@ fn test_expr() {
r#"ARRAY_FILTER(col, y -> y % 2 = 0)"#,
r#"(current_timestamp, current_timestamp(), now())"#,
r#"ARRAY_REDUCE([1,2,3], (acc,t) -> acc + t)"#,
r#"MAP_FILTER({1:1,2:2,3:4}, (k, v) -> k > v)"#,
r#"MAP_TRANSFORM_KEYS({1:10,2:20,3:30}, (k, v) -> k + 1)"#,
r#"MAP_TRANSFORM_VALUES({1:10,2:20,3:30}, (k, v) -> v + 1)"#,
];

for case in cases {
Expand Down
Loading

0 comments on commit f6429ae

Please sign in to comment.