Some fixes

This commit is contained in:
Ivan Lezhankin 2020-04-03 16:54:11 +03:00
parent 679ce12bc9
commit ade3e026fa
8 changed files with 29 additions and 26 deletions

View File

@ -1,20 +1,20 @@
DROP TABLE IF EXISTS test.check_comments;
DROP TABLE IF EXISTS check_comments;
CREATE TABLE test.check_comments
CREATE TABLE check_comments
(
column_name1 UInt8 DEFAULT 1 COMMENT 'comment',
column_name2 UInt8 COMMENT 'non default comment'
) ENGINE = ReplicatedMergeTree('clickhouse/tables/test_comments', 'r1')
ORDER BY column_name1;
SHOW CREATE test.check_comments;
DESC test.check_comments;
SHOW CREATE check_comments;
DESC check_comments;
ALTER TABLE test.check_comments COMMENT COLUMN column_name1 'another comment';
ALTER TABLE check_comments COMMENT COLUMN column_name1 'another comment';
SHOW CREATE test.check_comments;
DESC test.check_comments;
SHOW CREATE check_comments;
DESC check_comments;
SELECT * FROM system.columns WHERE table = 'check.comments' and database = 'test';
SELECT * FROM system.columns WHERE table = 'check.comments' and database = currentDatabase();
DROP TABLE test.check_comments;
DROP TABLE check_comments;

View File

@ -71,3 +71,5 @@ SELECT joinGet('test_00800.join_test', 'b', 1);
USE default;
DROP TABLE test_00800.join_test;
DROP DATABASE test_00800;

View File

@ -1,16 +1,16 @@
SET allow_experimental_live_view = 1;
DROP TABLE IF EXISTS test.lv;
DROP TABLE IF EXISTS test.mt;
DROP TABLE IF EXISTS lv;
DROP TABLE IF EXISTS mt;
SELECT name, value from system.settings WHERE name = 'temporary_live_view_timeout';
SELECT name, value from system.settings WHERE name = 'live_view_heartbeat_interval';
CREATE TABLE test.mt (a Int32) Engine=MergeTree order by tuple();
CREATE LIVE VIEW test.lv WITH TIMEOUT 1 AS SELECT sum(a) FROM test.mt;
CREATE TABLE mt (a Int32) Engine=MergeTree order by tuple();
CREATE LIVE VIEW lv WITH TIMEOUT 1 AS SELECT sum(a) FROM mt;
SHOW TABLES FROM test LIKE 'lv';
SHOW TABLES FROM currentDatabase() LIKE 'lv';
SELECT sleep(2);
SHOW TABLES FROM test LIKE 'lv';
SHOW TABLES FROM currentDatabase() LIKE 'lv';
DROP TABLE test.mt;
DROP TABLE mt;

View File

@ -13,4 +13,6 @@ select sleep(1) format Null; -- sleep a bit to wait possible merges after insert
set max_threads = 1;
optimize table t final;
select sum(a) from t where a in (0, 3) and b = 0;
select sum(a) from t where a in (0, 3) and b = 0;
drop table t;

View File

@ -1,6 +1,3 @@
CREATE DATABASE IF NOT EXISTS tpch;
USE tpch;
DROP TABLE IF EXISTS part;
DROP TABLE IF EXISTS supplier;
DROP TABLE IF EXISTS partsupp;
@ -265,7 +262,7 @@ from
where
l_shipdate >= date '1994-01-01'
and l_shipdate < date '1994-01-01' + interval '1' year
and l_discount between toDecimal32(0.06, 2) - toDecimal32(0.01, 2)
and l_discount between toDecimal32(0.06, 2) - toDecimal32(0.01, 2)
and toDecimal32(0.06, 2) + toDecimal32(0.01, 2)
and l_quantity < 24;
@ -672,7 +669,7 @@ where
and l_shipmode in ('AIR', 'AIR REG')
and l_shipinstruct = 'DELIVER IN PERSON'
);
select 20, 'fail: correlated subquery'; -- TODO: Missing columns: 'ps_suppkey' 'ps_partkey'
select
s_name,

View File

@ -24,7 +24,7 @@ def cmdopts(request):
def bin_prefix(cmdopts):
prefix = 'clickhouse'
if cmdopts['builddir'] is not None:
prefix = os.path.join(cmdopts['builddir'], 'dbms', 'programs', prefix)
prefix = os.path.join(cmdopts['builddir'], 'programs', prefix)
return prefix

View File

@ -57,4 +57,4 @@ def test_query(bin_prefix, sql_query, standalone_server):
run_client(bin_prefix, tcp_port, 'DROP DATABASE {random};'.format(random=random_name), '')
query = "SELECT 'SHOW ORPHANED DATABASES'; SHOW DATABASES;"
run_client(bin_prefix, tcp_port, query, 'SHOW ORPHANED DATABASES\ndefault\nsystem\n')
run_client(bin_prefix, tcp_port, query, 'SHOW ORPHANED DATABASES\n_temporary_and_external_tables\ndefault\nsystem\n')

View File

@ -75,7 +75,9 @@ class ServerThread(threading.Thread):
# If process has died then try to fetch output before releasing lock
if self._proc.returncode is not None:
self._proc.communicate()
stdout, stderr = self._proc.communicate()
print >> sys.stderr, stdout
print >> sys.stderr, stderr
if self._proc.returncode == 70: # Address already in use
retries -= 1
@ -121,7 +123,7 @@ ServerThread.DEFAULT_SERVER_CONFIG = \
<users_config>users.xml</users_config>
<mark_cache_size>5368709120</mark_cache_size>
<timezone>UTC</timezone>
<timezone>Europe/Moscow</timezone>
<remote_servers>
<test_shard_localhost>