1#include <iostream>
2#include <iomanip>
3
4#include <Interpreters/AggregationCommon.h>
5
6#include <Common/HashTable/HashMap.h>
7#include <Common/HashTable/HashSet.h>
8
9
10
11int main(int, char **)
12{
13 {
14 using Cont = HashSet<int, DefaultHash<int>, HashTableGrower<1>>;
15 Cont cont;
16
17 cont.insert(1);
18 cont.insert(2);
19
20 Cont::LookupResult it;
21 bool inserted;
22 int key = 3;
23 cont.emplace(key, it, inserted);
24 std::cerr << inserted << ", " << key << std::endl;
25
26 cont.emplace(key, it, inserted);
27 std::cerr << inserted << ", " << key << std::endl;
28
29 for (auto x : cont)
30 std::cerr << x.getValue() << std::endl;
31
32 DB::WriteBufferFromOwnString wb;
33 cont.writeText(wb);
34
35 std::cerr << "dump: " << wb.str() << std::endl;
36 }
37
38 {
39 using Cont = HashSet<
40 DB::UInt128,
41 DB::UInt128TrivialHash>;
42 Cont cont;
43
44 DB::WriteBufferFromOwnString wb;
45 cont.write(wb);
46
47 std::cerr << "dump: " << wb.str() << std::endl;
48 }
49
50 return 0;
51}
52