-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(expr): Implement lambda function and array_transform #11937
Conversation
Signed-off-by: TennyZhuang <[email protected]>
Signed-off-by: TennyZhuang <[email protected]>
Ideas of some tests:
Also question on failure tolerance: if |
Signed-off-by: TennyZhuang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #11937 +/- ##
==========================================
- Coverage 70.21% 70.15% -0.06%
==========================================
Files 1380 1382 +2
Lines 231054 231280 +226
==========================================
+ Hits 162237 162263 +26
- Misses 68817 69017 +200
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
arg: Ident, | ||
body: ast::Expr, | ||
) -> Result<ExprImpl> { | ||
let lambda_args = HashMap::from([(arg.real_value(), (0usize, input_ty))]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we plan to support the lambda function capturing other input columns in the future? If yes, I am not sure whether this 0 index of InputRef
would make it hard to be compatible in the future. Otherwise, It seems we need to introduce something like FunctionCallWithLambdaV2
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can use CorrelatedInputRef
to represent the captured columns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite suitable I think, since we cannot evaluate CorrelatedInputRef
in expressions directly. All CorrelatedInputRef
need to be converted into InputRef
during subquery unnesting.
Signed-off-by: TennyZhuang <[email protected]> Co-authored-by: stonepage <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Resolve #11952
array_transform
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
Implement
array_transform