-
Notifications
You must be signed in to change notification settings - Fork 526
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): build expression from pretty string #8774
Conversation
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
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 would suggest $idx
and int32
/int64
instead of #idx
and int4
/int8
, for better consistency with our current system. BTW, it's great to see this work!🚀 Guess we may need some documents for the new DSL.
Codecov Report
@@ Coverage Diff @@
## main #8774 +/- ##
==========================================
- Coverage 71.07% 71.05% -0.03%
==========================================
Files 1167 1167
Lines 192447 192095 -352
==========================================
- Hits 136783 136490 -293
+ Misses 55664 55605 -59
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 10 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!! 🚀🚀🚀
All |
+1 on |
My fault 🥵, |
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!
Signed-off-by: Runji Wang <wangrunji0408@163.com>
d096706
to
1a6e39e
Compare
Signed-off-by: Runji Wang <wangrunji0408@163.com>
1a6e39e
to
327e3c3
Compare
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR introduces a simple DSL for expressions, so that we can build expressions painless in unit tests. (resolve #7881)
The language is defined as follows:
For example:
The overall design follows the egg. Except that we have to explicitly specify the return type of each node. It might not be the best and is subject to be changed if anyone has a better idea.
This PR contains a small lexer and parser for the DSL (mainly generated by GPT), and replaces boilerplate code with the new language whenever possible.
Checklist For Contributors
I have added necessary unit tests and integration testsI have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).I have demonstrated that backward compatibility is not broken by breaking changes and created issues to track deprecated features to be removed in the future. (Please refer to the issue)./risedev check
(or alias,./risedev c
)Checklist For Reviewers
Documentation