@@ -9,26 +9,29 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
9
9
10
10
echo " create or replace database rt_bloom" | $BENDSQL_CLIENT_CONNECT
11
11
12
- echo " create table rt_bloom.probe(c uint64) as select * from numbers(100000) " | $BENDSQL_CLIENT_CONNECT
12
+ echo " create table rt_bloom.probe(c uint64)" | $BENDSQL_CLIENT_CONNECT
13
13
echo " create table rt_bloom.build(c uint64)" | $BENDSQL_CLIENT_CONNECT
14
14
15
- echo " The probe table should consist of 2 blocks "
16
- echo " select block_count from fuse_snapshot('rt_bloom','probe' )" | $BENDSQL_CLIENT_CONNECT
15
+ echo " insert into rt_bloom. probe values (1),(2),(3) " | $BENDSQL_CLIENT_CONNECT
16
+ echo " insert into rt_bloom.probe values (4),(5),(6 )" | $BENDSQL_CLIENT_CONNECT
17
17
18
+ echo " The probe table should consist of 2 blocks"
19
+ echo " select block_count from fuse_snapshot('rt_bloom','probe') limit 1" | $BENDSQL_CLIENT_CONNECT
18
20
19
- echo " insert into rt_bloom.build values(50)" | $BENDSQL_CLIENT_CONNECT
20
21
22
+ echo " insert into rt_bloom.build values(5)" | $BENDSQL_CLIENT_CONNECT
21
23
22
24
echo " runtime range filter should work, one of the blocks should be pruned by range filter"
25
+ # leading spaces are trimmed, as distributed plan has different indentation
23
26
echo " explain analyze select * from rt_bloom.probe inner join rt_bloom.build on probe.c = build.c " \
24
- | $BENDSQL_CLIENT_CONNECT | grep " parts pruned by"
25
-
27
+ | $BENDSQL_CLIENT_CONNECT | grep " parts pruned by" | awk ' {$1=$1}1'
26
28
27
29
28
- echo " delete from rt_bloom.probe where c = 50 " | $BENDSQL_CLIENT_CONNECT ;
30
+ echo " delete from rt_bloom.probe where c = 5 " | $BENDSQL_CLIENT_CONNECT ;
29
31
echo " runtime bloom filter should work, another block should be pruned by bloom filter"
32
+ # leading spaces are trimmed, as distributed plan has different indentation
30
33
echo " explain analyze select * from rt_bloom.probe inner join rt_bloom.build on probe.c = build.c " \
31
- | $BENDSQL_CLIENT_CONNECT | grep " parts pruned by"
34
+ | $BENDSQL_CLIENT_CONNECT | grep " parts pruned by" | awk ' {$1=$1}1 '
32
35
33
36
echo " DROP TABLE rt_bloom.probe" | $BENDSQL_CLIENT_CONNECT
34
37
echo " DROP TABLE rt_bloom.build" | $BENDSQL_CLIENT_CONNECT
0 commit comments