Router query with true=false in LEFT JOIN errors out
Open
bug
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
**Schema**
```
CREATE TABLE test_src (id int, tenant_id int);
CREATE TABLE test_src_1 (id int, tenant_id int);
SELECT create_distributed_table('test_src','tenant_id');
SELECT create_distributed_table('test_src_1','tenant_id');
```
**Query that errors out.**
```
SELECT ts1.tenant_id,count(*) FROM test_src ts1 LEFT JOIN test_src ts2
ON true=false AND ts1.tenant_id = ts2.tenant_id WHERE ts1.tenant_id = 1
group by ts1.tenant_id;
```
**Query that works:**
```
SELECT ts1.tenant_id,count(*) FROM test_src ts1 LEFT JOIN test_src ts2
ON false=false AND ts1.tenant_id = ts2.tenant_id WHERE ts1.tenant_id = 1
group by ts1.tenant_id;
```
Contributor guide
Assessment
This issue has not been assessed yet.