Updated on 2024-09-03 GMT+08:00

Built-in Functions

HyperLogLog (HLL) has a series of built-in functions for internal data processing. Generally, you are not advised to use these functions.

Table 1 HLL built-in functions

Function

Function

hll_in

Receives hll data in string format.

hll_out

Sends hll data in string format.

hll_recv

Receives hll data in bytea format.

hll_send

Sends hll data in bytea format.

hll_trans_in

Receives hll_trans_type data in string format.

hll_trans_out

Sends hll_trans_type data in string format.

hll_trans_recv

Receives hll_trans_type data in bytea format.

hll_trans_send

Sends hll_trans_type data in bytea format.

hll_typmod_in

Receives typmod data.

hll_typmod_out

Sends typmod data.

hll_hashval_in

Receives hll_hashval data.

hll_hashval_out

Sends hll_hashval data.

hll_add_trans0

Works similar to hll_add, and is used during the initial phase of DNs in distributed aggregation procedures.

hll_union_trans

Works similar to hll_union, and is used on the first phase of DNs in distributed aggregation operations.

hll_union_collect

Works similar to hll_union, and is used on the second phase of CNs in distributed aggregation operations to summarize the results of each DN.

hll_pack

Is used on the third phase of CNs in distributed aggregation operations to convert a user-defined type hll_trans_type to the hll type.

hll

Converts a hll type to another hll type. Input parameters can be specified.

hll_hashval

Converts the bigint type to the hll_hashval type.

hll_hashval_int4

Converts the int4 type to the hll_hashval type.