Correlated subselect with "TRUE OR ..." condition in WHERE clause throws unexpected exception
Details
| Detail name | Value |
|---|---|
| Changelog Number | 16575 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | Exasol 8.6.0 |
| Fix Versions | Exasol 2025.1.0 |
| Resolution Date | 2025-07-08 |
Description
Correlated subselects with TRUE as one of the operands of OR node lead to unexpected exceptions.
Preparation
create schema s; create table t1(x int); create table t2(y int);
Example
Following query throws exception "tables are not allowed in this context"
select * from t2 where y = (select min(x) from t1 where x=y or true);
Workaround
Remove useless OR condition manually, as it results always with TRUE. Following query runs without errors:
select * from t2 where y = (select min(x) from t1);
Fix
Query runs as expected.