[Bug] lateral view explode_split("", ",") returns blank rows
- 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
version: apache-doris-4.1.2-bin-x64
doc: https://doris.apache.org/zh-CN/docs/4.x/sql-manual/sql-functions/table-functions/explode-split
MySQL [demo]> create table example(
-> k1 int
-> ) properties(
-> "replication_num" = "1"
-> );
Query OK, 0 rows affected (0.01 sec)
MySQL [demo]>
MySQL [demo]> insert into example values(1);
Query OK, 1 row affected (0.36 sec)
{'label':'label_70557f2afaab4730_b4e0ee72fde66dc4', 'status':'VISIBLE', 'txnId':'4'}
MySQL [demo]> select * from example lateral view explode_split("", ",") t2 as c;
Empty set (0.04 sec)
### What's Wrong?
the following query shall return one line.
MySQL [demo]> select * from example lateral view explode_split("", ",") t2 as c;
Empty set (0.04 sec)
### What You Expected?
as the docs,
select * from example lateral view explode_split("abc", ",") t2 as c;
+------+------+
| k1 | c |
+------+------+
| 1 | abc |
+------+------+l
3.x works ok
### 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 with the explode_split table-function documentation and reproduce the reported lateral-view query on Apache Doris 4.1.2, comparing it with the stated 3.x behavior. Trace how an empty string is handled and verify the fix makes the query return one row with the expected blank value without changing the documented abc example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100