mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 18:02:24 +00:00
fix test
This commit is contained in:
parent
dd330d9aee
commit
d33c22b3e3
@ -0,0 +1,2 @@
|
|||||||
|
1
|
||||||
|
1
|
@ -7,18 +7,21 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
FILE_PREFIX="${CLICKHOUSE_USER_FILES_UNIQUE:?}_test_03277"
|
||||||
|
|
||||||
mkdir -p "${CLICKHOUSE_USER_FILES_UNIQUE:?}"
|
function cleanup()
|
||||||
rm -rf "${CLICKHOUSE_USER_FILES_UNIQUE:?}"/*
|
{
|
||||||
|
rm "${FILE_PREFIX}"*
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
|
||||||
FILE_CSV="${CLICKHOUSE_USER_FILES_UNIQUE:?}/03277.csv"
|
FILE_CSV="${FILE_PREFIX}.csv"
|
||||||
FILE_ARROW="${CLICKHOUSE_USER_FILES_UNIQUE:?}/03277.arrow"
|
FILE_ARROW="${FILE_PREFIX}.arrow"
|
||||||
|
|
||||||
|
|
||||||
$CLICKHOUSE_CLIENT -q "
|
$CLICKHOUSE_CLIENT -q "
|
||||||
SET async_insert = 1;
|
SET async_insert = 1;
|
||||||
SELECT '${FILE_CSV}';
|
|
||||||
CREATE TABLE t0 (c0 Int) ENGINE = File(CSV);
|
CREATE TABLE t0 (c0 Int) ENGINE = File(CSV);
|
||||||
INSERT INTO TABLE t0 (c0) VALUES (1);
|
INSERT INTO TABLE t0 (c0) VALUES (1);
|
||||||
INSERT INTO TABLE FUNCTION file('$FILE_CSV', 'CSV', 'c0 Int') SELECT c0 FROM t0;
|
INSERT INTO TABLE FUNCTION file('$FILE_CSV', 'CSV', 'c0 Int') SELECT c0 FROM t0;
|
||||||
@ -30,13 +33,9 @@ $CLICKHOUSE_CLIENT -q "DROP TABLE t0"
|
|||||||
|
|
||||||
$CLICKHOUSE_CLIENT -q "
|
$CLICKHOUSE_CLIENT -q "
|
||||||
SET async_insert = 1;
|
SET async_insert = 1;
|
||||||
SELECT '${FILE_ARROW}';
|
|
||||||
CREATE TABLE t0 (c0 Int) ENGINE = Join(ANY, INNER, c0);
|
CREATE TABLE t0 (c0 Int) ENGINE = Join(ANY, INNER, c0);
|
||||||
INSERT INTO TABLE FUNCTION file('$FILE_ARROW', 'Arrow', 'c0 Int') SELECT c0 FROM t0;
|
INSERT INTO TABLE FUNCTION file('$FILE_ARROW', 'Arrow', 'c0 Int') SELECT c0 FROM t0;
|
||||||
INSERT INTO TABLE t0 (c0) FROM INFILE '$FILE_ARROW' FORMAT Arrow;
|
INSERT INTO TABLE t0 (c0) FROM INFILE '$FILE_ARROW' FORMAT Arrow;
|
||||||
"
|
"
|
||||||
$CLICKHOUSE_CLIENT -q "SELECT * from t0"
|
$CLICKHOUSE_CLIENT -q "SELECT * from t0"
|
||||||
$CLICKHOUSE_CLIENT -q "DROP TABLE t0"
|
$CLICKHOUSE_CLIENT -q "DROP TABLE t0"
|
||||||
|
|
||||||
|
|
||||||
rm -rf "${CLICKHOUSE_USER_FILES_UNIQUE:?}"/*
|
|
Loading…
Reference in New Issue
Block a user