Analytic Function ROW_NUMBER together with emits UDFs lead to an error

Details

Detail name Value
Changelog Number 4313
Type Bug
Status Open
Affected Versions EXASOL 6.0.0, Exasol 6.1.0

Background:

Starting with version 6, statements containing the analytical function row_number() together with an emits UDF are expected to work (due to an improvement that you can have UDFs plus additional items in the select list), it does not work however.

Example:
The following statement

with x1 as (
	select emitter(10) -- emits column A
)
select 
   a, 
   row_number() over(order by a desc) b
from x1;

throws the exception:

[42000] emitting function in expression

Workaround:

The statement above can be rewritten as

with x1 as (
	select emitter(10)
)
select 
   a,
   count(1) over (order by a desc)
from x1
order by a asc;