Hi
After creating quite complex view based on "UNION ALL" of 4 complex selects I've ended up with a curious situation:
- The view itself is queried OK with simple queries like
select * from <view_name> where <conditions>
- Once I wrap it into bigger select like
select count(*) from (select * from <view_name> where <conditions>)
I get the following strange error:
GENERIC_INTERNAL_ERROR: Missing variable: <column_name>
where <column_name>
is absolutely live and valid column that could be queried and returned as usual
The issue is repeatable - once I recreate the same set of views on another Database and same data - issue repeats
However it's barely searched on the web - looks like nobody faced such errors