Setting derived column name fails for UNION ALL

Details

Detail name Value
Changelog Number 19318
Type Bug
Status Resolved
Affected Versions Exasol 7.1.0, Exasol 8.0.0
Fix Versions Exasol 8.29.0
Resolution Date 2024-07-12

Description

A valid query using a derived column name for a UNION ALL table fails with ‘object <column name> not found’.

Example

-- This fails with 'Error "object A1 not found"
SELECT * FROM (SELECT 1 UNION ALL SELECT 2) AS A(A1) WHERE A1 < 2;

Workaround

Give the desired column names to the columns of the first SELECT within the UNION ALL.

SELECT * FROM (SELECT 1 AS A1 UNION ALL SELECT 2) AS A(A1) WHERE A1 < 2;

Fix

Those queries run as expected.