Skip to content

Commit 27c3940

Browse files
committed
feat(query): add tests
1 parent d096592 commit 27c3940

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

src/query/functions-v2/src/aggregates/aggregate_distinct_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ impl DistinctStateFunc<KeysRef> for AggregateDistinctStringState {
288288
data: values,
289289
offsets,
290290
};
291-
return Ok(vec![Column::String(c.build())]);
291+
Ok(vec![Column::String(c.build())])
292292
}
293293
}
294294

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
102
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env bash
2+
3+
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
4+
. "$CURDIR"/../../../shell_env.sh
5+
6+
7+
echo "create table s_distinct (a String);" | $MYSQL_CLIENT_CONNECT
8+
9+
for i in `seq 1 100`;do
10+
echo "insert into s_distinct values ('$i'), ('$[i+1]'), ('$[i+2]')" | $MYSQL_CLIENT_CONNECT
11+
done
12+
13+
echo "select count(distinct a) from s_distinct" | $MYSQL_CLIENT_CONNECT
14+
15+
echo "drop table s_distinct;" | $MYSQL_CLIENT_CONNECT

0 commit comments

Comments
 (0)