Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested aggregation is allowed [CORE5848] #6109

Open
firebird-automations opened this issue Jun 19, 2018 · 0 comments
Open

Nested aggregation is allowed [CORE5848] #6109

firebird-automations opened this issue Jun 19, 2018 · 0 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Following query should NOT be allowed (nested aggregation):

with
rf as (
select 1 as p from rdb$database union all
select 3 from rdb$database union all
select 5 from rdb$database union all
select 7 from rdb$database
)
,dual as (
select 1 x from rdb$database
)

select
count(
sum (
(select sum(rf.p) from rf)
)
)
from dual;

But:
1) it returns "internal Firebird consistency check (EVL_expr: invalid operation (232), file: evl.cpp line: 1220)" on WI-V2.5.9.27111
2) it runs without any error on WI-V3.0.4.32988 and WI-T4.0.0.1008 Firebird (and returns: 0 - which is also wrong because argument of COUNT is NOT-null value :)).

PS.
I've opened this separate ticket after discuss with dimitr, related to CORE5563

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant