Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

Show all

HLL Operators

Updated on 2024-12-19 GMT+08:00

The HLL type supports the following operators:

Table 1 HLL Operators

HLL Operators

Description

Return Type

Example

=

Checks whether the values of hll and hll_hashval are equal.

bool

  • hll
1
2
3
4
5
SELECT (hll_empty() || hll_hash_integer(1)) = (hll_empty() || hll_hash_integer(1));
 ?column?
----------
 t
(1 row)
  • hll_hashval
1
2
3
4
5
SELECT hll_hash_integer(1) = hll_hash_integer(1);
 ?column? 
----------
 t
(1 row)

<> or !=

Checks whetherthe values of hll and hll_hashval are not equal.

bool

  • hll
1
2
3
4
5
SELECT (hll_empty() || hll_hash_integer(1)) <> (hll_empty() || hll_hash_integer(2));
 ?column? 
----------
 t
(1 row)
  • hll_hashval
1
2
3
4
5
SELECT hll_hash_integer(1) <> hll_hash_integer(2);
 ?column? 
----------
 t
(1 row)

||

Represents the functions of hll_add, hll_union, and hll_add_rev.

hll

  • hll_add
1
2
3
4
5
SELECT hll_empty() || hll_hash_integer(1);
         ?column?         
--------------------------
 \x128b7f8895a3f5af28cafe
(1 row)
  • hll_add_rev
1
2
3
4
5
SELECT hll_hash_integer(1) || hll_empty();
         ?column?         
--------------------------
 \x128b7f8895a3f5af28cafe
(1 row)
  • hll_union
1
2
3
4
5
SELECT (hll_empty() || hll_hash_integer(1)) || (hll_empty() || hll_hash_integer(2));
                 ?column?                 
------------------------------------------
 \x128b7f8895a3f5af28cafeda0ce907e4355b60
(1 row)

#

Calculates the distinct value of the hll, which is equivalent to the hll_cardinality function.

integer

1
2
3
4
5
SELECT #(hll_empty() || hll_hash_integer(1));
 ?column? 
----------
        1
(1 row)
Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback