> The solution is change the statement to select avg(cast(int_field as
> bigint)) from some_table.
>
> Is this an expected condition ? If int_field is defined as integer....
> while cast to bigint ?
It's not nice... Some database solve this problem (HSQLDB as far as I
know) while others don't (MS SQL Server, not sure what version). I
will try to solve this for the next release, but I'm not sure yet if I
can for all data types.
Regards,
Thomas
The problem for AVG will be fixed in the next release. There is a
problem for SUM as well: it can overflow when using large values. In
the next release, SUM will return a data type that is safe. I hope
this will not break applications that call ResultSet.getObject and
expect the old data type.
Regards,
Thomas