pipelinedb Continuous Views xxx_mrel NUMERIC to bytea?

72 Views Asked by At

enter image description hereI ran into a problem with pipelinedb.

There is a NUMERIC type field in the Continuous Views I built, but the mrel table generated in pipelinedb is bytea. Why is this?

Have you met? There is a good solution. Thank you

Here is the photos:

This is the result of the two columns

This is the difference between the two columns

1

There are 1 best solutions below

1
Derek Nelson On

Materialization tables (<cv name>_mrel>) store all of the state necessary to incrementally update aggregate values. These are called "transition" values. For example, to incrementally update an average, both the item count and sum must be stored; storing the average itself is not sufficient.

Some of these transition values are encoded as bytea. There is then an "overlay" view on top of the materialization table that "finalizes" the transition value at read time to give you the up-to-date aggregate value.