ydb-platform / ydb

YDB is an open source Distributed SQL Database that combines high availability and scalability with strong consistency and ACID transactions
https://ydb.tech
Apache License 2.0
3.83k stars 532 forks source link

Fix KqpOlapAggregations.Aggregation_ResultCountAll_Filter #7299

Closed zverevgeny closed 1 month ago

zverevgeny commented 1 month ago

test in currently disabled in CI https://github.com/ydb-platform/ydb/blob/a169e9b918a82cf46c22d55989ca4ef275fabbba/.github/config/muted_ya.txt#L13

fexolm commented 1 month ago

Basically, this test was failing because check for resultCount is incorrect. This check is done very early before reducing aggregation result. It expects that for every partition aggregation would return single row or nothing, but it is not always true. Sometimes partitions are spitted to several record batches, and in this case at this stage resulting batch would contain a row for each input batch.

@ivanmorozov333 told that 3 should be a good threshold for that test. If this check would fail again, this could be an indicator that something could be wrong.