-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Port StringToArray to function-arrays subcrate
#9543
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
Conversation
|
|
||
| #[tokio::test] | ||
| async fn test_fn_string_to_array() -> Result<()> { | ||
| let expr = string_to_array(lit("abc##def##ghi"), lit("##"), lit("!")); |
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.
Some test cases are already covered in array.slt
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.
Firstly, thanks for the review. Addressed.
| ### `string_to_array` | ||
|
|
||
| Splits a string in to an array of substrings based on a delimiter. Any substrings matching the optional `null_str` argument are replaced with NULL. | ||
| `SELECT string_to_array('abc##def', '##')` or `SELECT string_to_array('abc def', ' ', 'def')` |
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.
👍
|
You can follow the |
StringToArray to function-arrays subcrate
jayzhan211
left a comment
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.
Thanks @erenavsarogullari
Which issue does this PR close?
Closes #9497.
What changes are included in this PR?
This PR aims to do following changes in terms of Epic #9285:
1- Port
StringToArraytofunction-arrayssubcrate,2- Argument length check is added to
string_to_arrayfunction: ref3- Case: delimiter is
NULLwas breaking test case underarray.sltsuch asSELECT string_to_array('abc', NULL). This case is also handled: ref4- Function Documentation is added.
Are these changes tested?
Yes, all
array.sltbasedstring_to_arraytests are passed.Are there any user-facing changes?
No