ClickHouse/dbms/tests/queries/0_stateless/00504_insert_miss_columns.sh
proller e7f82b6a8c
Allow run test without package install and on custom ports. (#1643)
* ExtractFromConfig --try

* Add symlinks to package

* clickhouse-test --order option
2017-12-15 22:34:19 +03:00

18 lines
997 B
Bash
Executable File

#!/usr/bin/env bash
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
. $CURDIR/../shell_config.sh
# https://github.com/yandex/ClickHouse/issues/1300
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS test.advertiser";
$CLICKHOUSE_CLIENT -q "DROP TABLE IF EXISTS test.advertiser_test";
$CLICKHOUSE_CLIENT -q "CREATE TABLE test.advertiser ( action_date Date, adblock UInt8, imps Int64 ) Engine = SummingMergeTree( action_date, ( adblock ), 8192, ( imps ) )";
$CLICKHOUSE_CLIENT -q "CREATE TABLE test.advertiser_test ( action_date Date, adblock UInt8, imps Int64, Hash UInt64 ) Engine = SummingMergeTree( action_date, ( adblock, Hash ), 8192, ( imps ) )";
# This test will fail. It's ok.
$CLICKHOUSE_CLIENT -q "INSERT INTO test.advertiser_test SELECT *, sipHash64( CAST(adblock AS String) ), CAST(1 AS Int8) FROM test.advertiser;" 2>/dev/null
$CLICKHOUSE_CLIENT -q "DROP TABLE test.advertiser";
$CLICKHOUSE_CLIENT -q "DROP TABLE test.advertiser_test";
$CLICKHOUSE_CLIENT -q "SELECT 'Still alive'";