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
SELECT from derived table which contains GROUP BY on field with literal value returns wrong result [CORE4360] #4682
Comments
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovdescription: LI-T3.0.0.30889 Sample 1. CSQL> (record with letter 'a' does not appear) Sample 2.
============ (why ZERO ??) Sample 3.
========================= (this date is known as Modified Julian Day, but it is NOT 'begin of epoch' in FB; so, why it is here ?) PS. Results in LI-V2.5.3.26744 looks OK: SQL> select c from( select 'a' c from rdb$database group by 'a' ) x group by c; Ca SQL> select c from( select 123 c from rdb$database group by 1 ) x group by c;
============ SQL> select c from( select current_timestamp c from rdb$database group by 1 ) x group by c;
========================= => LI-T3.0.0.30889 Sample 1. CSQL> (record with letter 'a' does not appear) Sample 2.
============ (why ZERO ??) Sample 3.
========================= (this date is known as Modified Julian Day, but it is NOT 'begin of epoch' in FB; so, why it is here ?) PS. Results in LI-V2.5.3.26744 looks OK: SQL> select c from( select 'a' c from rdb$database group by 'a' ); Ca SQL> select c from( select 123 c from rdb$database group by 1 );
============ SQL> select c from( select current_timestamp c from rdb$database group by 1 );
========================= summary: group by from derived table which contains group by on field with LITERAL value returns wrong result => Select from derived table which contains GROUP BY on field with literal value returns wrong result |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 1 [ 10332 ] |
Modified by: Sean Leyne (seanleyne)summary: Select from derived table which contains GROUP BY on field with literal value returns wrong result => SELECT from derived table which contains GROUP BY on field with literal value returns wrong result |
Commented by: @pcisar Test created. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @pavel-zotov
Is related to QA594
LI-T3.0.0.30889
Sample 1.
########
SQL> select c from( select 'a' c from rdb$database group by 'a' );
C
SQL>
(record with letter 'a' does not appear)
Sample 2.
########
SQL> select c from( select 123 c from rdb$database group by 1 );
============
0
(why ZERO ??)
Sample 3.
########
SQL> select c from( select current_timestamp c from rdb$database group by 1 );
=========================
1858-11-17 00:00:00.0000
(this date is known as Modified Julian Day, but it is NOT 'begin of epoch' in FB; so, why it is here ?)
PS. Results in LI-V2.5.3.26744 looks OK:
SQL> select c from( select 'a' c from rdb$database group by 'a' );
C
a
SQL> select c from( select 123 c from rdb$database group by 1 );
============
123
SQL> select c from( select current_timestamp c from rdb$database group by 1 );
=========================
2014-03-09 09:46:42.0180
Commits: 523f1ea FirebirdSQL/fbt-repository@5dbcbd3
The text was updated successfully, but these errors were encountered: