[MonetDB-users] Bug with average of decimals when an empty table is returned

Arjen van der Meijden acmmailing at tweakers.net
Tue May 24 15:26:07 CEST 2005


Hi list,

I noticed a weird result from AVG when doing one of my queries; 
-1.7976931348623158e+307

Appearantly it happens with this minimal testcase:
monetdb-> create table emptyone (field decimal(3,1));
Operation successful

monetdb-> select avg(field) from emptyone;
+------------------------+
| scale_down_avg_field   |
+========================+
| -1.7976931348623158E307 |
+------------------------+
1 row

The result should afaik be NULL, not this value. With a decimal(3) it 
works correctly by the way. The same behaviour is seen with numeric(3,1) 
vs numeric(3).

Best regards,

Arjen




More information about the users-list mailing list