-
Notifications
You must be signed in to change notification settings - Fork 705
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
fix substring function #636
Conversation
Thanks for the contribution! Please review the labels and make any necessary changes. |
Codecov Report
@@ Coverage Diff @@
## master #636 +/- ##
======================================
Coverage 80% 80%
======================================
Files 286 284 -2
Lines 13782 13848 +66
======================================
+ Hits 11094 11150 +56
- Misses 2688 2698 +10
Continue to review full report at Codecov.
|
common/datavalues/src/data_type.rs
Outdated
@@ -259,6 +259,22 @@ pub fn numerical_arithmetic_coercion( | |||
} | |||
} | |||
|
|||
#[inline] | |||
pub fn numerical_singed_coercion(val_type: &DataType) -> Result<DataType> { |
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.
single ?
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.
fixed, PTAL @sundy-li
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.
numerical_signed_coercion
convert unsigned data type to signed
Stateless tests are not passed. Please take look at: https://github.com/datafuselabs/datafuse/blob/master/scripts/ci/ci-stateless-tests-standalone.sh |
arrow_primitive_array_negate!(&value_array, &coercion_type) | ||
} | ||
// @todo support other unary operation | ||
_ => Result::Err(ErrorCodes::BadArguments("Unsupported unary operation")) |
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.
It's better to hint what's the op is in the error:
ErrorCodes::BadArguments(format!( "Unsupported unary operation: {:?} as argument", op))
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.
modfied, PTAL @BohuTANG
I have fixed the test. PTAL @sundy-li |
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
CI Passed |
Summary
add
DataArrayArithmetic::data_array_unary_arithmetic_op
to support unary operation.add some test case from substring
Changelog
Related Issues
Fixes #573
Test Plan
Unit Tests
Stateless Tests