mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-09 16:02:23 +00:00
23 lines
983 B
Bash
Executable File
23 lines
983 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
# shellcheck source=../shell_config.sh
|
|
. "$CUR_DIR"/../shell_config.sh
|
|
|
|
FILE_DIR=$CLICKHOUSE_TEST_UNIQUE_NAME
|
|
mkdir -p $FILE_DIR
|
|
|
|
$CLICKHOUSE_LOCAL -q "select * from numbers(100000) format Native" > $FILE_DIR/data.native
|
|
$CLICKHOUSE_LOCAL -q "select * from numbers(100000) format CSV" > $FILE_DIR/data.csv
|
|
$CLICKHOUSE_LOCAL -q "select * from numbers(100000) format JSONEachRow" > $FILE_DIR/data.jsonl
|
|
|
|
$CLICKHOUSE_LOCAL -q "desc file('$FILE_DIR/*', One)"
|
|
$CLICKHOUSE_LOCAL -q "select * from file('$FILE_DIR/*', One)"
|
|
$CLICKHOUSE_LOCAL -q "select _file from file('$FILE_DIR/*', One) order by _file"
|
|
$CLICKHOUSE_LOCAL -q "select * from file('$FILE_DIR/*', One, 'x UInt8')"
|
|
$CLICKHOUSE_LOCAL -q "select * from file('$FILE_DIR/*', One, 'x UInt64')" 2>&1 | grep "BAD_ARGUMENTS" -c
|
|
$CLICKHOUSE_LOCAL -q "select * from file('$FILE_DIR/*', One, 'x UInt8, y UInt8')" 2>&1 | grep "BAD_ARGUMENTS" -c
|
|
|
|
rm -rf $FILE_DIR
|
|
|