Queries containing virtual tables and FALSE predicates may lead to an internal server error

Details

Detail name Value
Changelog Number 11134
Type Bug
Status Resolved
Affected Versions Exasol 6.2.0, Exasol 7.0.0
Fix Versions Exasol 7.0.4, Exasol 6.2.12
Resolution Date 2020-11-13

Description

A query that meets the following conditions will return an internal server error:

  • A query contains a subselect
  • The subselect references a virtual table
  • A WHERE condition evaluates to FALSE (ex. WHERE 1=0 or WHERE FALSE)
  • This filter filters out all rows of the subselect

Example:

select x from (select max(a) x from virtual_schema.virtual_table) where false;

Workaround

You can encapsulate the subselect containing the virtual table with another subselect to avoid the internal server error. For example:

select x from (select x from (select max(a) x from virtual_schema.virtual_table)) where false;

Fix

These types of queries will run as expected.