-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Port StringToArray
to function-arrays
subcrate
#9543
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.
@@ -3113,6 +3113,7 @@ _Alias of [make_array](#make_array)._ | |||
### `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
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
StringToArray
tofunction-arrays
subcrate,2- Argument length check is added to
string_to_array
function: ref3- Case: delimiter is
NULL
was breaking test case underarray.slt
such asSELECT string_to_array('abc', NULL)
. This case is also handled: ref4- Function Documentation is added.
Are these changes tested?
Yes, all
array.slt
basedstring_to_array
tests are passed.Are there any user-facing changes?
No