Fix groupBitmapAnd/Or/Xor name

This commit is contained in:
Amos Bird 2021-07-20 20:51:23 +08:00
parent d89e10e289
commit 9fdae29421
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4
3 changed files with 6 additions and 1 deletions

View File

@ -60,7 +60,7 @@ public:
{ {
} }
String getName() const override { return Data::name(); } String getName() const override { return Policy::name; }
DataTypePtr getReturnType() const override { return std::make_shared<DataTypeNumber<T>>(); } DataTypePtr getReturnType() const override { return std::make_shared<DataTypeNumber<T>>(); }
@ -120,6 +120,7 @@ template <typename Data>
class BitmapAndPolicy class BitmapAndPolicy
{ {
public: public:
static constexpr auto name = "groupBitmapAnd";
static void apply(Data & lhs, const Data & rhs) { lhs.rbs.rb_and(rhs.rbs); } static void apply(Data & lhs, const Data & rhs) { lhs.rbs.rb_and(rhs.rbs); }
}; };
@ -127,6 +128,7 @@ template <typename Data>
class BitmapOrPolicy class BitmapOrPolicy
{ {
public: public:
static constexpr auto name = "groupBitmapOr";
static void apply(Data & lhs, const Data & rhs) { lhs.rbs.rb_or(rhs.rbs); } static void apply(Data & lhs, const Data & rhs) { lhs.rbs.rb_or(rhs.rbs); }
}; };
@ -134,6 +136,7 @@ template <typename Data>
class BitmapXorPolicy class BitmapXorPolicy
{ {
public: public:
static constexpr auto name = "groupBitmapXor";
static void apply(Data & lhs, const Data & rhs) { lhs.rbs.rb_xor(rhs.rbs); } static void apply(Data & lhs, const Data & rhs) { lhs.rbs.rb_xor(rhs.rbs); }
}; };

View File

@ -0,0 +1 @@
1 1 0

View File

@ -0,0 +1 @@
SELECT groupBitmapAnd(bitmapBuild([toInt32(1)])), groupBitmapOr(bitmapBuild([toInt32(1)])), groupBitmapXor(bitmapBuild([toInt32(1)])) FROM cluster(test_cluster_two_shards, numbers(10));