Filter optimization can cause exception or internal server error in case when a filter condition in WHERE clause is not explicitly boolean expression
Details
| Detail name | Value |
|---|---|
| Changelog Number | 22885 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | Exasol 8.32.0 |
| Fix Versions | Exasol 8.33.0 |
| Resolution Date | 2025-02-27 |
Description
Since database version 8.32.0 some queries that worked in version 8.31.0 now fail and return one of the following errors:
- more than one column in select list of correlated subselect
- GROUP BY in correlated subselect
- internal server error
Root cause
The issue arises due to filter optimization in the following scenarios:
- When a filter condition in the WHERE clause can be pushed down to a sub-select.
- When the filter condition is not explicitly a Boolean expression, but rather a column that can be of Boolean type, though not necessarily required to be.
Example
create table A (A1 int,A2 int); insert into A values (1, 1); select A1 from (select min(true) as abool, A1 from A group by 2) where abool;
Workaround
Affected queries contain at least one condition in a WHERE , which names a column. This expression has to be extended with = true.
create table A (A1 int,A2 int); insert into A values (1, 1); select A1 from (select min(true) as abool, A1 from A group by 2) where abool=true
Fix
The affected queries will run again without needing the workaround.