-
Notifications
You must be signed in to change notification settings - Fork 729
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
add soundex function #3446
add soundex function #3446
Conversation
Thanks for the contribution! Please review the labels and make any necessary changes. |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/databend/databend/DzdPyQUy5fHD3sqAjqumDm2jGJbJ [Deployment for fefc821 canceled] |
Thanks for the contribution! Please review the labels and make any necessary changes. |
Thanks for the contribution! Please review the labels and make any necessary changes. |
Thanks for the contribution! Please review the labels and make any necessary changes. |
This pull request has merge conflicts that must be resolved before it can be merged. @bestgopher please rebase it 🙏 |
Fixes #3045 |
Codecov Report
@@ Coverage Diff @@
## main #3446 +/- ##
=====================================
- Coverage 61% 60% -1%
=====================================
Files 624 625 +1
Lines 34781 34860 +79
=====================================
+ Hits 21226 21252 +26
- Misses 13555 13608 +53
Continue to review full report at Codecov.
|
…le quotation marks in sql
}; | ||
} | ||
DataType::Null => Ok(DataColumn::Constant(DataValue::Null, input_rows)), | ||
_ => { |
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 did not know why this branch returns an empty String column.
Maybe we should cast the column into String column in previous.
// Null/Primitive array can cast into String column.
let column = columns[0].cast_with_type(DataType::String);
let column = column.string()?;
match column {
Constant => {},
Array(x) => {}
}
|
||
fn return_type(&self, args: &[DataType]) -> Result<DataType> { | ||
match args[0] { | ||
DataType::Null => Ok(DataType::Null), |
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.
if args[0].is_numeric() || args[0] == DataType::String || args[0] == DataType::Null {
Ok(DataType::String)
} else {
Err(ErrorCode::IllegalDataType(format!(
"Expected string/numeric, but got {}",
args[0]
)))
}
@mergify update |
✅ Branch has been successfully updatedHey, I reacted but my real name is @Mergifyio |
Thank you @bestgopher |
I hereby agree to the terms of the CLA available at: https://databend.rs/policies/cla/
Summary
Summary about this PR
Changelog
Related Issues
Fixes #issue
Test Plan
Unit Tests
Stateless Tests