mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
add test
This commit is contained in:
parent
111f4d49e3
commit
6c4be506fd
@ -4,7 +4,6 @@ namespace DB
|
||||
{
|
||||
namespace ErrorCodes
|
||||
{
|
||||
extern const int MEMORY_LIMIT_EXCEEDED;
|
||||
extern const int LOGICAL_ERROR;
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ try
|
||||
DB::ReadBufferFromString b4(s4);
|
||||
|
||||
DB::ConcatReadBuffer concat({&b1, &b2, &b3, &b4});
|
||||
DB::PeekableReadBuffer peekable(concat, 0, 16);
|
||||
DB::PeekableReadBuffer peekable(concat, 0);
|
||||
|
||||
ASSERT_TRUE(!peekable.eof());
|
||||
assertAvailable(peekable, "0123456789");
|
||||
|
@ -0,0 +1,3 @@
|
||||
1000100
|
||||
1000100
|
||||
1000100
|
20
tests/queries/0_stateless/01184_insert_values_huge_strings.sh
Executable file
20
tests/queries/0_stateless/01184_insert_values_huge_strings.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "drop table if exists default.huge_strings"
|
||||
$CLICKHOUSE_CLIENT -q "create table default.huge_strings (n UInt64, l UInt64, s String, h UInt64) engine=MergeTree order by n"
|
||||
|
||||
for _ in {1..10}; do
|
||||
$CLICKHOUSE_CLIENT -q "select number, (rand() % 100*1000*1000) as l, repeat(randomString(l/1000/1000), 1000*1000) as s, cityHash64(s) from numbers(10) format Values" | $CLICKHOUSE_CLIENT -q "insert into default.huge_strings values" &
|
||||
$CLICKHOUSE_CLIENT -q "select number % 10, (rand() % 100) as l, randomString(l) as s, cityHash64(s) from numbers(100000)" | $CLICKHOUSE_CLIENT -q "insert into default.huge_strings format TSV" &
|
||||
done;
|
||||
wait
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "select count() from huge_strings"
|
||||
$CLICKHOUSE_CLIENT -q "select sum(l = length(s)) from huge_strings"
|
||||
$CLICKHOUSE_CLIENT -q "select sum(h = cityHash64(s)) from huge_strings"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "drop table huge_strings"
|
Loading…
Reference in New Issue
Block a user