ClickHouse

Форк
0
/
FunctionsUniqTheta.cpp 
65 строк · 2.6 Кб
1
#include <Functions/FunctionFactory.h>
2

3
#include "FunctionsUniqTheta.h"
4

5
#if USE_DATASKETCHES
6

7
namespace DB
8
{
9

10
REGISTER_FUNCTION(UniqTheta)
11
{
12
    factory.registerFunction<FunctionUniqThetaIntersect>(
13
            FunctionDocumentation{.description = R"(
14
Two uniqThetaSketch objects to do intersect calculation(set operation ∩), the result is a new uniqThetaSketch.
15

16
A uniqThetaSketch object is to be constructed by aggregation function uniqTheta with -State.
17

18
UniqThetaSketch is a data structure storage of approximate values set.
19
For more information on RoaringBitmap, see: [Theta Sketch Framework](https://datasketches.apache.org/docs/Theta/ThetaSketchFramework.html).
20

21
Typical usage:
22
[example:typical]
23
)",
24
                    .examples{
25
                            {"typical", "select finalizeAggregation(uniqThetaIntersect(arrayReduce('uniqThetaState',[1,2]), arrayReduce('uniqThetaState',[2,3,4])));", ""}},
26
                    .categories{"uniqTheta"}
27
            });
28

29
    factory.registerFunction<FunctionUniqThetaUnion>(
30
            FunctionDocumentation{.description = R"(
31
Two uniqThetaSketch objects to do union calculation(set operation ∪), the result is a new uniqThetaSketch.
32

33
A uniqThetaSketch object is to be constructed by aggregation function uniqTheta with -State.
34

35
UniqThetaSketch is a data structure storage of approximate values set.
36
For more information on RoaringBitmap, see: [Theta Sketch Framework](https://datasketches.apache.org/docs/Theta/ThetaSketchFramework.html).
37

38
Typical usage:
39
[example:typical]
40
)",
41
                    .examples{
42
                            {"typical", "select finalizeAggregation(uniqThetaUnion(arrayReduce('uniqThetaState',[1,2]), arrayReduce('uniqThetaState',[2,3,4])));", ""}},
43
                    .categories{"uniqTheta"}
44
            });
45
    factory.registerFunction<FunctionUniqThetaNot>(
46
            FunctionDocumentation{.description = R"(
47
Two uniqThetaSketch objects to do a_not_b calculation(set operation ×), the result is a new uniqThetaSketch.
48

49
A uniqThetaSketch object is to be constructed by aggregation function uniqTheta with -State.
50

51
UniqThetaSketch is a data structure storage of approximate values set.
52
For more information on RoaringBitmap, see: [Theta Sketch Framework](https://datasketches.apache.org/docs/Theta/ThetaSketchFramework.html).
53

54
Typical usage:
55
[example:typical]
56
)",
57
                    .examples{
58
                            {"typical", "select finalizeAggregation(uniqThetaNot(arrayReduce('uniqThetaState',[1,2]), arrayReduce('uniqThetaState',[2,3,4])));", ""}},
59
                    .categories{"uniqTheta"}
60
            });
61
}
62

63
}
64

65
#endif
66

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.