add NOT expression#600
Conversation
|
Thanks for the contribution! Please review the labels and make any necessary changes. |
Codecov Report
@@ Coverage Diff @@
## master #600 +/- ##
======================================
Coverage 80% 80%
======================================
Files 288 286 -2
Lines 13756 13729 -27
======================================
+ Hits 11027 11052 +25
+ Misses 2729 2677 -52
Continue to review full report at Codecov.
|
|
@bohutang This PR is ready. Could you please review it? |
|
Ok, ping @sundy-li for a review |
|
Ok, Better after #550 , it will be finished in at most 2 days. |
|
@sundy-li Could you please review this PR? |
Ok, If your pr is not ready, you can create a draft PR. When it's ready, you can click |
Got it. It is ready now. |
| )) | ||
| } | ||
| _ => Result::Err(ErrorCodes::BadDataValueType(format!( | ||
| "DataValue Error: Cannot do data_array Not, array:{:?}", |
There was a problem hiding this comment.
I think DataColumnarValue::Constant case should be considered.
- Using
val.to_array(), return the value asDataColumnarValue::Array - Creating a array with just one element, and apply the
compute::not, then return the value asDataColumnarValue::Constant
The second option can have better performance.
There was a problem hiding this comment.
We can have the stateless tests like select number from numbers(10) where not ( 5 )
There was a problem hiding this comment.
Thanks for the suggestions. The function returns Result<DataArrayRef>, is it possible to return value as DataColumnarValue::Constant?
There was a problem hiding this comment.
It's ok as DataColumnarValue
There was a problem hiding this comment.
I have changed the code. Could you review it again?
Summary
Support negation of boolean expression
Changelog
Fixes #597
Test Plan
Unit Tests