- =
描述:比较hll或hll_hashval的值是否相等。
返回值类型:bool
示例:
–hll
gbase=#
select (hll_empty() || hll_hash_integer(1)) = (hll_empty() || hll_hash_integer(1));
?column?
———-
t
(1 row)
–hll_hashval
gbase=# select hll_hash_integer(1) = hll_hash_integer(1);
?column?
———-
t
(1 row)
- <> or !=
描述:比较hll或hll_hashval是否不相等。
返回值类型:bool
示例:
–hll
gbase=#
select (hll_empty() || hll_hash_integer(1)) <> (hll_empty() || hll_hash_integer(2));
?column?
———-
t
(1 row)
–hll_hashval
gbase=#
select hll_hash_integer(1) <> hll_hash_integer(2);
?column?
———-
t
(1 row)
- ||
描述:可代表hll_add、hll_union、hll_add_rev三个函数的功能。
返回值类型:hll
示例:
–hll_add
gbase=#
select hll_empty() || hll_hash_integer(1);
?column?
—————————————————————————-
\x484c4c08000002002b0900000000000000f03f3e2921ff133fbaed3e2921ff133fbaed00
(1 row)
–hl_add_rev
gbase=#
select hll_hash_integer(1) || hll_empty();
?column?
—————————————————————————-
\x484c4c08000002002b0900000000000000f03f3e2921ff133fbaed3e2921ff133fbaed00
(1 row)
–hll_union
gbase=#
select (hll_empty() || hll_hash_integer(1)) || (hll_empty() || hll_hash_integer(2));
?column?
——————————————————————————————–
\x484c4c10002000002b090000000000000000400000000000000000b3ccc49320cca1ae3e2921ff133fbaed00
(1 row)
- #
描述:计算出hll的Dintinct值, 同hll_cardinality函数。
返回值类型:int
示例:
gbase=#
select #(hll_empty() || hll_hash_integer(1));
?column?
———-
1
(1 row)