-
Notifications
You must be signed in to change notification settings - Fork 600
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): implementation for char_length operation #2991
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2991 +/- ##
==========================================
- Coverage 73.25% 73.25% -0.01%
==========================================
Files 730 730
Lines 98392 98399 +7
==========================================
+ Hits 72080 72082 +2
- Misses 26312 26317 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
src/expr/src/expr/expr_unary.rs
Outdated
@@ -289,6 +289,11 @@ pub fn new_unary_expr( | |||
return_type, | |||
ascii, | |||
)), | |||
(ProstType::CharLength, _, _) => Box::new(UnaryExpression::<Utf8Array, I64Array, _>::new( |
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.
nit:
By https://www.postgresql.org/docs/9.1/functions-string.html and https://www.postgresql.org/docs/current/datatype.html,
it seems the data type of the return value should be signed four-byte integer
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!
What's changed and what's your intention?
implement
char_length
operationChecklist
./risedev check
(or alias,./risedev c
)Refer to a related PR or issue link (optional)
related issue #112