CONNECT BY crashes with expression containing LEVEL pseudocolumn and non-PRIOR-lookup in connect by-expression

Details

Detail name Value
Changelog Number 6010
Type Bug
Status Resolved
Affected Versions EXASOL 6.0.0
Fix Versions EXASOL 6.0.9
Resolution Date 2018-04-18
Description

CONNECT BY crashes when using LEVEL pseudocolumn in a join condition on the same side as the non-PRIOR-lookups.

This is reported with error message Successfully reconnected after internal server error.

Example:
with t (i) as (values 1,2,3)
select i, level
    from t
    connect by
        prior i = i + LEVEL; --> problem
Expected Behavior

Exasol can not evaluate this join condition. Therefore, a proper exception ("Feature not supported") should indicate this limitation.

Workaround

The problem appears only if LEVEL is used on the non-PRIOR side of the CONNECT BY expression so you might be able to rewrite the connect-expression to have LEVEL on PRIOR side:

with t (i) as (values 1,2,3)
select i, level
    from t
    connect by
        prior i - LEVEL = i; -- ok