I have a question about Generic Aggregate Function...
# questions-and-troubleshooting
c
I have a question about Generic Aggregate Function States. Unlike HLL and Bitmap types, column state is managed as
varbinary
, and the function state type is set at table definition, e.g.
hll_sketch_agg varbinary ds_hll_count_distinct(varchar)
. This means that sketches created outside of Starrocks can be used after insertion into a such-defined column. My question: is there a way to use external serialized states in Iceberg tables WITHOUT first inserting into a defined table? In particular it would be great to be able to use Generic Aggregate Function States in materialized views, but there is no way I can tell to cast or inject function type metadata, and I get this error:
AggState's AggFunc should have AggStateDesc: ds_hll_count_distinct_union(varbinary)
. I think this use-case should not be very difficult to support. Any ideas?
For example, this works in Snowflake directly off of Iceberg
Copy code
select DATASKETCHES_HLL_ESTIMATE(DATASKETCHES_HLL_COMBINE("hll")) from TEST_HLL;
Is there a way that Starrocks can also do this?