[fix] change parameter type of hll_cardinality from STRING to HLL (#9002)

In #8882, we disabled the conversion from string to hll. So we need to change the parameter type of hll_cardinality() too
This commit is contained in:
Mingyu Chen
2022-04-15 15:17:11 +08:00
committed by GitHub
parent 7634e55513
commit a2d6724fa7
3 changed files with 9 additions and 5 deletions

View File

@ -1175,7 +1175,7 @@ visible_functions = [
'', '', 'vec', ''],
#hll function
[['hll_cardinality'], 'BIGINT', ['VARCHAR'],
[['hll_cardinality'], 'BIGINT', ['HLL'],
'_ZN5doris12HllFunctions15hll_cardinalityEPN9doris_udf15FunctionContextERKNS1_9StringValE',
'', '', 'vec', 'ALWAYS_NOT_NULLABLE'],
[['hll_hash'], 'HLL', ['VARCHAR'],
@ -1184,9 +1184,6 @@ visible_functions = [
[['hll_empty'], 'HLL', [],
'_ZN5doris12HllFunctions9hll_emptyEPN9doris_udf15FunctionContextE',
'', '', 'vec', 'ALWAYS_NOT_NULLABLE'],
[['hll_cardinality'], 'BIGINT', ['STRING'],
'_ZN5doris12HllFunctions15hll_cardinalityEPN9doris_udf15FunctionContextERKNS1_9StringValE',
'', '', 'vec', 'ALWAYS_NOT_NULLABLE'],
[['hll_hash'], 'HLL', ['STRING'],
'_ZN5doris12HllFunctions8hll_hashEPN9doris_udf15FunctionContextERKNS1_9StringValE',
'', '', 'vec', 'ALWAYS_NOT_NULLABLE'],

View File

@ -9,3 +9,8 @@
2 \N
3 \N
-- !sql_hll_cardinality --
1 0
2 1
3 2

View File

@ -27,4 +27,6 @@ suite("basic_agg_test") {
qt_sql_bitmap """select * from bitmap_basic_agg;"""
qt_sql_hll """select * from hll_basic_agg;"""
}
qt_sql_hll_cardinality """select k1, hll_cardinality(hll_union(k2)) from hll_basic_agg group by k1 order by k1;"""
}