Runtime Error: index out of range
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
### 1. Minimal reproduce step (Required)
```sql
create table t0(c0 INT);
create view v1 as select exists( select 6 from t0 union select c_0 from t0 ) c_2 from ( select 0 c_0 ) subq_0;
create view v2 as select 7 c_1 from t0 where ( select c_2 from v1 );
create view v3 as select ( select c_2 from v1 ) c_3, ( select 7 from v2 ) c_4;
select c_4 from v3 where(c_4 = abs(c_3)); ERROR 1105 (HY000) at line 1: runtime error: index out of range [0] with length 0
```
### 2. What did you expect to see? (Required)
No error
### 3. What did you see instead (Required)
### 4. What is your TiDB version? (Required)
`tiup playground nightly --host 0.0.0.0 --kv 3 --tiflash 3`
```bash
8.0.11-TiDB-v9.0.0-beta.1.pre-554-gb1a5536a64-dirty
```
Contributor guide
Assessment
This issue has not been assessed yet.