added function test for bitmapHasAny + scalar subquery

This commit is contained in:
Zhichang Yu 2019-06-04 16:17:37 +08:00
parent 6d0e7b7b21
commit ddad564bab
2 changed files with 9 additions and 0 deletions

View File

@ -15,6 +15,9 @@
2019-01-02 60 [11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70] 2019-01-02 60 [11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70]
60 50 70 40 20 30 60 50 70 40 20 30
60 50 70 40 20 30 60 50 70 40 20 30
90
90
20
2019-01-01 50 2019-01-01 50
2019-01-02 60 2019-01-02 60
1 1

View File

@ -56,6 +56,12 @@ ALL LEFT JOIN
) )
USING city_id; USING city_id;
SELECT count(*) FROM bitmap_test WHERE bitmapHasAny((SELECT groupBitmapState(uid) FROM bitmap_test WHERE pickup_date = '2019-01-01'), bitmapBuild([uid]));
SELECT count(*) FROM bitmap_test WHERE bitmapHasAny(bitmapBuild([uid]), (SELECT groupBitmapState(uid) FROM bitmap_test WHERE pickup_date = '2019-01-01'));
SELECT count(*) FROM bitmap_test WHERE 0 = bitmapHasAny((SELECT groupBitmapState(uid) FROM bitmap_test WHERE pickup_date = '2019-01-01'), bitmapBuild([uid]));
-- bitmap state test -- bitmap state test
DROP TABLE IF EXISTS bitmap_state_test; DROP TABLE IF EXISTS bitmap_state_test;
CREATE TABLE bitmap_state_test CREATE TABLE bitmap_state_test