Migrate control-flow functions to new expression framework
Tasks
- [x]
multi_ifhttps://github.com/datafuselabs/databend/pull/6832 - [ ]
is_null - [ ]
is_not_null - [ ] ~~
in~~
@sundy-li Currently, function in has signature in(<input>, list_0, list_1, ....). Can we change it to array_contains(T, Array(T))? Therefore, a IN (1, 2, 3) will be desugured into array_contains(a, array_construct(1, 2, 3)).
@sundy-li Currently, function
inhas signaturein(<input>, list_0, list_1, ....). Can we change it toarray_contains(T, Array(T))? Therefore,a IN (1, 2, 3)will be desugured intoarray_contains(a, array_construct(1, 2, 3)).
Yes, we can do it in type_checker.
I am now trying to implement IS_NULL and IS_NOT_null and I want to know how to generate the file:
https://github.com/datafuselabs/databend/blob/42de73d733c05573815c8c8ada7c3c6fa9d43226/src/query/functions-v2/tests/it/scalars/testdata/control.txt
@sundy-li @andylokandy
See the comments in: https://github.com/datafuselabs/databend/blob/fc868936df12e06f5c907c335ac813e950c3eb8b/src/query/functions-v2/tests/it/main.rs
See the comments in: https://github.com/datafuselabs/databend/blob/fc868936df12e06f5c907c335ac813e950c3eb8b/src/query/functions-v2/tests/it/main.rs
thanks!