-
Notifications
You must be signed in to change notification settings - Fork 598
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 bitwise operation #2884
Conversation
LGTM! Please resolve the conflicts later |
And also rebase on main so the buildkite can be successfully triggered. |
May I know how to rebase on the main so that it can be trigger? |
On your local |
Run |
ac7b8fb
to
d38b82c
Compare
Codecov Report
@@ Coverage Diff @@
## main #2884 +/- ##
==========================================
+ Coverage 72.62% 72.64% +0.02%
==========================================
Files 718 719 +1
Lines 95936 96096 +160
==========================================
+ Hits 69669 69806 +137
- Misses 26267 26290 +23
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 |
4e5c88e
to
3de3bc5
Compare
{ int32, int16, int32, $general_f }, | ||
{ int32, int32, int32, $general_f }, | ||
{ int32, int64, int64, $general_f }, | ||
{ int64, int16,int64, $general_f }, |
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.
Please reformat it, cargo fmt --all
seems not work on code in macro.
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.
Rest LGTM
06328bd
to
b7f0d46
Compare
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.
license-eye has totally checked 817 files.
Valid | Invalid | Ignored | Fixed |
---|---|---|---|
815 | 1 | 1 | 0 |
Click to see the invalid file list
- src/frontend/test_runner/tests/gen/testcases.rs
I think I have done the edition already, May I request for approver. |
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.
Good job!🚀
src/expr/src/vector_op/bitwise_op.rs
Outdated
general_shift(l, r, |a, b| match a.checked_shl(b) { | ||
Some(c) => Ok(c), | ||
None => Err(RwError::from(NumericValueOutOfRange)), | ||
}) |
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.
FYI a.checked_shl(b).ok_or_else
Not sure if this looks better or worse.
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.
Alright I change it for mine part. general_shift(l, r, |a,b| a.checked_shl(b).ok_or_else( || RwError::from(NumericValueOutOfRange)))
. I feel it looks better.
Just to point out, the previous writing I was copying from arithmetic_op.rs
. Should it be changed as well for consistency across similar code?
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.
Keeping them consistent would be better.
* Add bitwise_op.rs and implement << and >> * Add ExprType and Do binding of BinaryOperator to ExprType * ModifeModified expr and frontend * Working for >> and << * Trying to add bitand but facing problem * Done implementation for bitwise and or XOR(#), TODO ~ and Unit Test and e2e test * Edit Bitwise not But still have server closed unexpected error * Bitwise not done implemetation. TODO Testing * Done Unit testing, and done code e2e test * Done Unit testing, and done code e2e test * last commit * Final commit * Edit minor changes * Final commit * return the error * Revert * Change to Upper Snake Case * Remove wRemove extra white space at the end of the code * Remove wadd extra ace at the end of the code * Modifed e2e tests * Delete Bitwise e2e * Change e2e bitwise from select to values * Revert "Change e2e bitwise from select to values" This reverts commit 8934877. * revision * Edit error * Resolve all comments except 'no overflow' comment * Delete the additional test and solve formatting issues * Resolve test error * OTrucated to zero * Change error in test * Change error in test * Edit Test error * Edit test error * Change format * Resolve compilation error * Resolve error * Resolve error * Resolve test error * Resolve test error * Resolve type_inference error * Resolve format error * Resolve format error * Resolve format error * Resolve test error * Resolve error * Resolve license fail * Edit the lose edition * Resolve error due to merge conflict resolve error * Revert to having overflow error * Remove autogenerated unwanted file * Resolve some comments - Duplication, Docs on Code * Resolves all other comments * Delete unwanted import * Resolve merge error * Format error Co-authored-by: LIU Zhi <lmatz823@gmail.com>
What's changed and what's your intention?
Implement bitwise operation (& , | , # (XOR), ~, >> , << ) supports integer number.
Add unit testing for the expr
Add e2e testing
Refer to a related PR or issue link (optional)
closes #2494