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
Unexpected (wrong) results with COALESCE and GROUP BY [CORE2176] #2607
Comments
Modified by: @dyemanovassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @dyemanov It looks like the fourth test case is related to a nod_derived_expr handling, as EVL_expr() returns NULL because the stream's rpb_number is never considered valid. |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 Beta 1 [ 10251 ] |
Commented by: @dyemanov One more test case which currently fails: select * from ( select * from ( It seems to happen in the case of multiple COALESCE instances. If those instances are the same (i.e. both refer to relation ID), then no bug appears. |
Commented by: @asfernandes Fixed. |
Commented by: @pcisar QA test added. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] QA Status: Done with caveats Test Details: Test probably should be re-implemented: it hopes that in the future FB-versions there will be NO system tables (which currently not exists) with rdb$relations.rdb$relation_id < 30. |
Submitted by: @dyemanov
Is related to QA373
Test case:
select rdb$relation_id as c from rdb$relations
group by 1
-- correct result
select * from (
select rdb$relation_id as c from rdb$relations
) group by 1
-- also correct
select coalesce(rdb$relation_id, 0) as c from rdb$relations
group by 1
-- ERROR: no zero ID is reported, the last ID is reported twice
select * from (
select coalesce(rdb$relation_id, 0) as c from rdb$relations
) group by 1
-- ERROR: single NULL is returned
I doubt the third and fourth samples represent the same bug, as if I replace COALESCE with ROUND, the third one succeeds while the fourth one still returns NULL.
Commits: 720a49c dcfdeca
====== Test Details ======
Test probably should be re-implemented: it hopes that in the future FB-versions there will be NO system tables (which currently not exists) with rdb$relations.rdb$relation_id < 30.
The text was updated successfully, but these errors were encountered: