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

Union returns inconsistent field names [CORE1181] #1607

Closed
firebird-automations opened this issue Mar 27, 2007 · 5 comments
Closed

Union returns inconsistent field names [CORE1181] #1607

firebird-automations opened this issue Mar 27, 2007 · 5 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: michalk1 (michalk1)

The following select (which doesn't make sense by itself, it's just a demonstration of the problem) returns different field names and precisions in FB2.0.(0/1) vs FB1.5.X, dialect 1 database:

CREATE TABLE TESTTAB
(ID NUMERIC(15, 2));

SELECT ID FROM TESTTAB GROUP BY ID
UNION
SELECT CAST(0 AS NUMERIC(15,2)) AS ID FROM RDB$DATABASE

FB 1.5:
ID
----
0.00

FB 2.0:
F_1
-----
0.000

If i exchange the two selects in the union, i get:

FB 1.5:
ID
----
0.00

FB 2.0:
ID
-----
0.000

Although it's possible to workaround the problem by explicit typecasts and aliases in all branches of the union statement, this inconsistency doesn't look reasonable and affects backward compatibility.

Commits: 27e2ee9

====== Test Details ======

NOTE! Do _not_ use double 0e0 as test value!
Seems that this is the only number which representation on Windows and Linux differ (on Linux it has one additional zero in the decimal part).

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Workflow: jira [ 11715 ] => Firebird [ 15525 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

I'm not sure about recent v2.0.x point releases, but v2.1 and v2.5 return correct alias and scale in both dialect 1 and 3, so I mark this issue as resolved.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.1.0 [ 10041 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done with caveats

Test Details: NOTE! Do _not_ use double 0e0 as test value!
Seems that this is the only number which representation on Windows and Linux differ (on Linux it has one additional zero in the decimal part).

Test Specifics: [Platform (Windows/Linux) specific]

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