Unexpected error `Unknown table ''` on CTE
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
The following CTE query triggers an unexpected error `Unknown table ''`
```
WITH t1(c0) AS ((VALUES ROW(1))) SELECT * FROM t1;
```
It can run in MySQL https://www.db-fiddle.com/f/9p9SV6byegE8DbXcVAQTah/0
### 2. What did you expect to see? (Required)
No error.
### 3. What did you see instead (Required)
`Unknown table ''`
### 4. What is your TiDB version? (Required)
```
Release Version: v7.2.0-alpha-421-gabd9ff5ca6\nEdition: Community\nGit Commit Hash: abd9ff5ca6fe866224f243c931844f050fb4952c\nGit Branch: master\nUTC Build Time: 2023-06-14 08:57:42\nGoVersion: go1.20.3\nRace Enabled: false\nCheck Table Before Drop: false\nStore: unistore
```
Contributor guide
Assessment
This issue has not been assessed yet.