Hi everyone,
In postgres I have a table T like this:
create table T (
dimension varchar,
measure numeric)
Measure only contains values with a maximum of two decimal places (e.g. 0.25, 0.1, 0.85)
In postgres the query:
select sum(measure) from T where dimension='test' group by dimension
will show 114 for sum(measure) (which is exact).
The same query without relections in dremio will also give 114.
If I create a reflection in Dremio for table T like this:
ALTER DATASET test.t
CREATE AGGREGATE REFLECTION test_t
USING
DIMENSIONS (
dimension
)
MEASURES (
measure
)
and then rerun the same query dremio will show 114.00000000000003 as the result for sum(measure).
Obviously casting sum(measure) to a single precision type (float) will give me 114 again but I still wonder about the deviation. In the query Dremio uses to create the reflection the datatype of measure is not beeing messed with.
Is this a problem with Dremio internal datatypes?