You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result type of aggregate function AVG over a BIGINT column results in a column type INT128. This makes no sense because the average can never exceed the maximum of the input type. Similarly, AVG over INTEGER should return INTEGER, not BIGINT, etc.
SQL> set sqlda_display on;
SQL> select avg(cast(1 as bigint)) from rdb$database;
INPUT message field count: 0
OUTPUT message field count: 1
01: sqltype: 32752 INT128 Nullable scale: 0 subtype: 0 len: 16
: name: AVG alias: AVG
: table: owner:
AVG
=============================================
1
SQL>
Expected would be sqltype: 580 INT64
The text was updated successfully, but these errors were encountered:
I doubt it's worth changing old datatypes - just cause incompatibilities in old applications. What about bigint => int128 & DECFLOAT(16 => 34) I will fix - just wait a little, may be somebody will see problems with it.
The result type of aggregate function
AVG
over aBIGINT
column results in a column typeINT128
. This makes no sense because the average can never exceed the maximum of the input type. Similarly,AVG
overINTEGER
should returnINTEGER
, notBIGINT
, etc.Expected would be sqltype: 580 INT64
The text was updated successfully, but these errors were encountered: