Skip to content

Commit 57cff3f

Browse files
aggregate_functions: add uniqApacheHLL coverage
uniqApacheHLL is an Antalya-only aggregate function (Altinity/ClickHouse#2398) whose state is compatible with Apache DataSketches HLL. The suite reuses the any checks for supported types and adds checks for rejected types, HLL estimation mode, lg_k and HLL type parameters, empty strings, and reading an external DataSketches state. Skipped on non-Antalya builds and before 26.6. Snapshots are x86_64 only; aarch64 follows. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: CarlosFelipeOR <[email protected]>
1 parent ec7975f commit 57cff3f

14 files changed

Lines changed: 2900 additions & 2 deletions

‎aggregate_functions/regression.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,18 @@ def argparser(parser):
863863
Skip,
864864
"groupFormat test is not implemented",
865865
),
866+
"/aggregate functions/part */uniqApacheHLL": (
867+
Skip,
868+
"uniqApacheHLL is introduced in Antalya 26.6",
869+
lambda test: check_if_not_antalya_build(test)
870+
or check_clickhouse_version("<26.6")(test),
871+
),
872+
"/aggregate functions/part */:/uniqApacheHLL:": (
873+
Skip,
874+
"uniqApacheHLL is introduced in Antalya 26.6",
875+
lambda test: check_if_not_antalya_build(test)
876+
or check_clickhouse_version("<26.6")(test),
877+
),
866878
}
867879

868880

‎aggregate_functions/requirements/requirements.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@
298298
* 3.1.4.35.1 [RQ.SRS-031.ClickHouse.AggregateFunctions.Miscellaneous.AnalysisOfVariance](#rqsrs-031clickhouseaggregatefunctionsmiscellaneousanalysisofvariance)
299299
* 3.1.4.36 [flameGraph](#flamegraph)
300300
* 3.1.4.36.1 [RQ.SRS-031.ClickHouse.AggregateFunctions.Miscellaneous.FlameGraph](#rqsrs-031clickhouseaggregatefunctionsmiscellaneousflamegraph)
301+
* 3.1.4.37 [uniqApacheHLL](#uniqapachehll)
302+
* 3.1.4.37.1 [RQ.SRS-031.ClickHouse.AggregateFunctions.Miscellaneous.UniqApacheHLL](#rqsrs-031clickhouseaggregatefunctionsmiscellaneousuniqapachehll)
301303
* 3.1.5 [Parametric Functions](#parametric-functions)
302304
* 3.1.5.1 [histogram](#histogram)
303305
* 3.1.5.1.1 [RQ.SRS-031.ClickHouse.AggregateFunctions.Parametric.Histogram](#rqsrs-031clickhouseaggregatefunctionsparametrichistogram)
@@ -1417,6 +1419,13 @@ version: 1.0
14171419

14181420
[ClickHouse] SHALL support [flameGraph] aggregate function.
14191421

1422+
##### uniqApacheHLL
1423+
1424+
###### RQ.SRS-031.ClickHouse.AggregateFunctions.Miscellaneous.UniqApacheHLL
1425+
version: 1.0
1426+
1427+
[ClickHouse] SHALL support `uniqApacheHLL` aggregate function.
1428+
14201429
#### Parametric Functions
14211430

14221431
##### histogram

‎aggregate_functions/requirements/requirements.py‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These requirements were auto generated
22
# from software requirements specification (SRS)
3-
# document by TestFlows v2.0.241127.1225014.
3+
# document by TestFlows v2.0.250110.1002922.
44
# Do not edit by hand but re-generate instead
55
# using 'tfs requirements generate' command.
66
from testflows.core import Specification
@@ -2241,6 +2241,21 @@
22412241
num="3.1.4.36.1",
22422242
)
22432243

2244+
RQ_SRS_031_ClickHouse_AggregateFunctions_Miscellaneous_UniqApacheHLL = Requirement(
2245+
name="RQ.SRS-031.ClickHouse.AggregateFunctions.Miscellaneous.UniqApacheHLL",
2246+
version="1.0",
2247+
priority=None,
2248+
group=None,
2249+
type=None,
2250+
uid=None,
2251+
description=(
2252+
"[ClickHouse] SHALL support `uniqApacheHLL` aggregate function.\n" "\n"
2253+
),
2254+
link=None,
2255+
level=5,
2256+
num="3.1.4.37.1",
2257+
)
2258+
22442259
RQ_SRS_031_ClickHouse_AggregateFunctions_Parametric_Histogram = Requirement(
22452260
name="RQ.SRS-031.ClickHouse.AggregateFunctions.Parametric.Histogram",
22462261
version="1.0",
@@ -3973,6 +3988,12 @@
39733988
level=5,
39743989
num="3.1.4.36.1",
39753990
),
3991+
Heading(name="uniqApacheHLL", level=4, num="3.1.4.37"),
3992+
Heading(
3993+
name="RQ.SRS-031.ClickHouse.AggregateFunctions.Miscellaneous.UniqApacheHLL",
3994+
level=5,
3995+
num="3.1.4.37.1",
3996+
),
39763997
Heading(name="Parametric Functions", level=3, num="3.1.5"),
39773998
Heading(name="histogram", level=4, num="3.1.5.1"),
39783999
Heading(
@@ -4351,6 +4372,7 @@
43514372
RQ_SRS_031_ClickHouse_AggregateFunctions_Miscellaneous_TheilsU,
43524373
RQ_SRS_031_ClickHouse_AggregateFunctions_Miscellaneous_AnalysisOfVariance,
43534374
RQ_SRS_031_ClickHouse_AggregateFunctions_Miscellaneous_FlameGraph,
4375+
RQ_SRS_031_ClickHouse_AggregateFunctions_Miscellaneous_UniqApacheHLL,
43544376
RQ_SRS_031_ClickHouse_AggregateFunctions_Parametric_Histogram,
43554377
RQ_SRS_031_ClickHouse_AggregateFunctions_Parametric_SequenceMatch,
43564378
RQ_SRS_031_ClickHouse_AggregateFunctions_Parametric_sequenceMatchEvents,
@@ -4688,6 +4710,8 @@
46884710
* 3.1.4.35.1 [RQ.SRS-031.ClickHouse.AggregateFunctions.Miscellaneous.AnalysisOfVariance](#rqsrs-031clickhouseaggregatefunctionsmiscellaneousanalysisofvariance)
46894711
* 3.1.4.36 [flameGraph](#flamegraph)
46904712
* 3.1.4.36.1 [RQ.SRS-031.ClickHouse.AggregateFunctions.Miscellaneous.FlameGraph](#rqsrs-031clickhouseaggregatefunctionsmiscellaneousflamegraph)
4713+
* 3.1.4.37 [uniqApacheHLL](#uniqapachehll)
4714+
* 3.1.4.37.1 [RQ.SRS-031.ClickHouse.AggregateFunctions.Miscellaneous.UniqApacheHLL](#rqsrs-031clickhouseaggregatefunctionsmiscellaneousuniqapachehll)
46914715
* 3.1.5 [Parametric Functions](#parametric-functions)
46924716
* 3.1.5.1 [histogram](#histogram)
46934717
* 3.1.5.1.1 [RQ.SRS-031.ClickHouse.AggregateFunctions.Parametric.Histogram](#rqsrs-031clickhouseaggregatefunctionsparametrichistogram)
@@ -5807,6 +5831,13 @@
58075831
58085832
[ClickHouse] SHALL support [flameGraph] aggregate function.
58095833
5834+
##### uniqApacheHLL
5835+
5836+
###### RQ.SRS-031.ClickHouse.AggregateFunctions.Miscellaneous.UniqApacheHLL
5837+
version: 1.0
5838+
5839+
[ClickHouse] SHALL support `uniqApacheHLL` aggregate function.
5840+
58105841
#### Parametric Functions
58115842
58125843
##### histogram

‎aggregate_functions/tests/any.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ def datatype(self, func, table, col_name):
1616
@TestScenario
1717
@Name("any")
1818
@Requirements(RQ_SRS_031_ClickHouse_AggregateFunctions_Standard_Any("1.0"))
19-
def scenario(self, func="any({params})", table=None, snapshot_id=None):
19+
def scenario(
20+
self, func="any({params})", table=None, snapshot_id=None, datatype_filter=None
21+
):
2022
"""Check any aggregate function."""
2123
self.context.snapshot_id = get_snapshot_id(
2224
snapshot_id=snapshot_id, clickhouse_version=">=23.2", add_analyzer=True
@@ -84,6 +86,9 @@ def scenario(self, func="any({params})", table=None, snapshot_id=None):
8486

8587
with Pool(5) as executor:
8688
for column in table.columns:
89+
if datatype_filter is not None and not datatype_filter(column.datatype):
90+
continue
91+
8792
Check(
8893
f"{column.datatype.name}",
8994
test=datatype,

0 commit comments

Comments
 (0)