[Bug] split_by_string("",',')
- Dominant language
- Java
- Stars
- 15.9k
- Forks
- 3.9k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 520
Description
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
### Version
3.x 4.x
MySQL [(none)]> select split_by_string("",',');
+-------------------------+
| split_by_string("",',') |
+-------------------------+
| [] |
+-------------------------+
### What's Wrong?
select split_by_string("",',') returns []
### What You Expected?
select split_by_string("",',') shall return ['']
### How to Reproduce?
_No response_
### Anything Else?
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [ ] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
Contributor guide
Research direction
Start by locating the SQL function entry point for split_by_string and any existing tests covering empty-string input. Reproduce split_by_string("", ',') and update the behavior so the result is ['']; add or adjust a regression test that confirms this expected output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- database
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100