crash instead of exception when using a view as select list element

Details

Detail name Value
Changelog Number 6294
Type Bug
Status Resolved
Affected Versions EXASOL 6.0.0
Fix Versions Exasol 6.1.0
Resolution Date 2018-06-07

Description

When selecting a view (instead of a column or expression) in the select-list an exception like 'table are not allowed in this context' should occur. Usually this happens. However, in some situations the query crashes.

The crash happens in some situations where another view is referenced at least twice in FROM-clause (directly or indirectly through other views).

Example
drop schema if exists test cascade;
create schema test;

create view sl_view as (select * from dual);
with other_view AS( select * from dual order by false) select sl_view from other_view, other_view;

For some queries the crash occurs only in the prepare phase of an execution as prepared statement, not in direct execution.

Expected Behavior

Instead of a crash the query should give the error message:

tables are not allowed in this context

Workaround

You just need to fix the query. A view or table is not a valid select-list-element.