mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
update Failed tests
This commit is contained in:
parent
027f8a02c8
commit
b88fef12de
@ -689,7 +689,7 @@ def test_dependencies():
|
||||
"CREATE DICTIONARY test.dict1(x UInt32, w String) PRIMARY KEY x SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() DB 'test' TABLE 'view')) LAYOUT(FLAT()) LIFETIME(0)"
|
||||
)
|
||||
instance.query(
|
||||
"CREATE DICTIONARY test.dict2(x UInt32, w String) PRIMARY KEY w SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() DB 'test' TABLE 'dict1')) LAYOUT(FLAT()) LIFETIME(0)"
|
||||
"CREATE DICTIONARY test.dict2(x UInt32, w String) PRIMARY KEY w SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() DB 'test' TABLE 'dict1')) LAYOUT(FLAT()) LIFETIME(0) SETTINGS(check_dictionary_primary_key = 0)"
|
||||
)
|
||||
instance.query(
|
||||
"CREATE TABLE test.table2(k String, v Int32 DEFAULT dictGet('test.dict2', 'x', k) - 1) ENGINE=MergeTree ORDER BY tuple()"
|
||||
@ -1421,7 +1421,8 @@ def test_tables_dependency():
|
||||
instance.query(f"CREATE MATERIALIZED VIEW {t3} TO {t2} AS SELECT x, y FROM {t1}")
|
||||
|
||||
instance.query(
|
||||
f"CREATE DICTIONARY {t4} (x Int64, y String) PRIMARY KEY x SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() TABLE '{t1.split('.')[1]}' DB '{t1.split('.')[0]}')) LAYOUT(FLAT()) LIFETIME(4)"
|
||||
f"CREATE DICTIONARY {t4} (x Int64, y String) PRIMARY KEY x SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() TABLE '{t1.split('.')[1]}' DB '{t1.split('.')[0]}')) "
|
||||
f"LAYOUT(FLAT()) LIFETIME(4) SETTINGS(check_dictionary_primary_key = 0)"
|
||||
)
|
||||
|
||||
instance.query(f"CREATE TABLE {t5} AS dictionary({t4})")
|
||||
@ -1433,7 +1434,8 @@ def test_tables_dependency():
|
||||
instance.query(f"CREATE VIEW {t7} AS SELECT sum(x) FROM (SELECT x FROM {t6})")
|
||||
|
||||
instance.query(
|
||||
f"CREATE DICTIONARY {t8} (x Int64, y String) PRIMARY KEY x SOURCE(CLICKHOUSE(TABLE '{t1.split('.')[1]}' DB '{t1.split('.')[0]}')) LAYOUT(FLAT()) LIFETIME(9)"
|
||||
f"CREATE DICTIONARY {t8} (x Int64, y String) PRIMARY KEY x SOURCE(CLICKHOUSE(TABLE '{t1.split('.')[1]}' DB '{t1.split('.')[0]}')) "
|
||||
f"LAYOUT(FLAT()) LIFETIME(9) SETTINGS(check_dictionary_primary_key = 0)"
|
||||
)
|
||||
|
||||
instance.query(f"CREATE TABLE {t9}(a Int64) ENGINE=Log")
|
||||
|
@ -884,7 +884,7 @@ def test_tables_dependency():
|
||||
|
||||
node1.query(
|
||||
"CREATE DICTIONARY mydb.dict ON CLUSTER 'cluster' (x Int64, y String) PRIMARY KEY x "
|
||||
"SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() DB 'mydb' TABLE 'src')) LAYOUT(FLAT()) LIFETIME(0)"
|
||||
"SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() DB 'mydb' TABLE 'src')) LAYOUT(FLAT()) LIFETIME(0) SETTINGS(check_dictionary_primary_key = 0)"
|
||||
)
|
||||
|
||||
node1.query(
|
||||
|
@ -116,12 +116,12 @@ def create_some_tables(db):
|
||||
node.query(
|
||||
"CREATE DICTIONARY {}.d1 (n int DEFAULT 0, m int DEFAULT 1) PRIMARY KEY n "
|
||||
"SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'rmt1' PASSWORD '' DB '{}')) "
|
||||
"LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT())".format(db, db)
|
||||
"LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT()) SETTINGS(check_dictionary_primary_key = 0)".format(db, db)
|
||||
)
|
||||
node.query(
|
||||
"CREATE DICTIONARY {}.d2 (n int DEFAULT 0, m int DEFAULT 1) PRIMARY KEY n "
|
||||
"SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'rmt2' PASSWORD '' DB '{}')) "
|
||||
"LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT())".format(db, db)
|
||||
"LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT()) SETTINGS(check_dictionary_primary_key = 0)".format(db, db)
|
||||
)
|
||||
node.query(
|
||||
"CREATE TABLE {}.merge (n int) ENGINE=Merge('{}', '(mt)|(mv)')".format(db, db)
|
||||
|
@ -33,7 +33,7 @@ create_query = """
|
||||
CREATE DICTIONARY test_dict(x Int32, y Int32) PRIMARY KEY x
|
||||
LAYOUT(FLAT())
|
||||
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'test_table' DB 'default'))
|
||||
LIFETIME(0)
|
||||
LIFETIME(0) SETTINGS(check_dictionary_primary_key = 0)
|
||||
"""
|
||||
|
||||
drop_query = "DROP DICTIONARY test_dict"
|
||||
|
@ -156,6 +156,7 @@ def test_create_and_select_mysql(started_cluster, clickhouse, name, layout):
|
||||
))
|
||||
{}
|
||||
LIFETIME(MIN 1 MAX 3)
|
||||
SETTINGS(check_dictionary_primary_key = 0)
|
||||
""".format(
|
||||
name, name, layout
|
||||
)
|
||||
@ -398,6 +399,7 @@ def test_dictionary_with_where(started_cluster):
|
||||
))
|
||||
LAYOUT(FLAT())
|
||||
LIFETIME(MIN 1 MAX 3)
|
||||
SETTINGS(check_dictionary_primary_key = 0)
|
||||
"""
|
||||
)
|
||||
|
||||
|
@ -114,7 +114,7 @@ def test_dependent_tables(started_cluster):
|
||||
query(
|
||||
"create dictionary a.d (n int default 0, m int default 42) primary key n "
|
||||
"source(clickhouse(host 'localhost' port tcpPort() user 'default' table 'src' password '' db 'lazy'))"
|
||||
"lifetime(min 1 max 10) layout(flat())"
|
||||
"lifetime(min 1 max 10) layout(flat()) SETTINGS(check_dictionary_primary_key = 0)"
|
||||
)
|
||||
query("create table system.join (n int, m int) engine=Join(any, left, n)")
|
||||
query("insert into system.join values (1, 1)")
|
||||
@ -126,7 +126,7 @@ def test_dependent_tables(started_cluster):
|
||||
query(
|
||||
"create dictionary test.d (n int default 0, m int default 42) primary key n "
|
||||
"source(clickhouse(host 'localhost' port tcpPort() user 'default' table 'src' password '' db 'default'))"
|
||||
"lifetime(min 1 max 10) layout(flat())"
|
||||
"lifetime(min 1 max 10) layout(flat()) SETTINGS(check_dictionary_primary_key = 0)"
|
||||
)
|
||||
query(
|
||||
"create table join (n int, m default dictGet('a.d', 'm', toUInt64(3)),"
|
||||
|
@ -0,0 +1,7 @@
|
||||
<clickhouse>
|
||||
<profiles>
|
||||
<default>
|
||||
<check_dictionary_primary_key>0</check_dictionary_primary_key>
|
||||
</default>
|
||||
</profiles>
|
||||
</clickhouse>
|
@ -9,6 +9,9 @@ node = cluster.add_instance(
|
||||
main_configs=[
|
||||
"configs/named_collections.xml",
|
||||
],
|
||||
user_configs=[
|
||||
"configs/disable_check_dictionary_primary_key.xml"
|
||||
],
|
||||
with_zookeeper=True,
|
||||
)
|
||||
|
||||
|
@ -698,12 +698,12 @@ def create_some_tables(db):
|
||||
main_node.query(
|
||||
f"CREATE DICTIONARY {db}.d1 (n int DEFAULT 0, m int DEFAULT 1) PRIMARY KEY n "
|
||||
"SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'rmt1' PASSWORD '' DB 'recover')) "
|
||||
"LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT())"
|
||||
"LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT()) SETTINGS(check_dictionary_primary_key = 0)"
|
||||
)
|
||||
dummy_node.query(
|
||||
f"CREATE DICTIONARY {db}.d2 (n int DEFAULT 0, m int DEFAULT 1) PRIMARY KEY n "
|
||||
"SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'rmt2' PASSWORD '' DB 'recover')) "
|
||||
"LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT())"
|
||||
"LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT()) SETTINGS(check_dictionary_primary_key = 0)"
|
||||
)
|
||||
|
||||
|
||||
@ -766,7 +766,7 @@ def test_recover_staled_replica(started_cluster):
|
||||
main_node.query_with_retry(
|
||||
"CREATE DICTIONARY recover.d2 (n int DEFAULT 0, m int DEFAULT 1) PRIMARY KEY n "
|
||||
"SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'rmt1' PASSWORD '' DB 'recover')) "
|
||||
"LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT());",
|
||||
"LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT()) SETTINGS(check_dictionary_primary_key = 0);",
|
||||
settings=settings,
|
||||
)
|
||||
|
||||
|
@ -23,7 +23,8 @@ CREATE DICTIONARY dictdb_01042.dict
|
||||
PRIMARY KEY x
|
||||
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'table' DB 'dictdb_01042' UPDATE_FIELD 'insert_time'))
|
||||
LAYOUT(FLAT())
|
||||
LIFETIME(1);
|
||||
LIFETIME(1)
|
||||
SETTINGS(check_dictionary_primary_key = 0);
|
||||
EOF
|
||||
|
||||
$CLICKHOUSE_CLIENT --query "SELECT '12 -> ', dictGetInt64('dictdb_01042.dict', 'y', toUInt64(12))"
|
||||
|
@ -17,7 +17,8 @@ CREATE DICTIONARY dictdb_01043.dict
|
||||
PRIMARY KEY key
|
||||
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'dicttbl' DB 'dictdb_01043'))
|
||||
LAYOUT(FLAT())
|
||||
LIFETIME(1);
|
||||
LIFETIME(1)
|
||||
SETTINGS(check_dictionary_primary_key = 0);
|
||||
|
||||
|
||||
SELECT dictGetString('dictdb_01043.dict', 'value_default', toUInt64(12));
|
||||
|
@ -16,14 +16,14 @@ $CLICKHOUSE_CLIENT -q "create table dict_src (n int, m int, s String) engine=Mer
|
||||
$CLICKHOUSE_CLIENT -q "create dictionary dict1 (n int default 0, m int default 1, s String default 'qqq')
|
||||
PRIMARY KEY n
|
||||
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'dict_src' PASSWORD '' DB '$CLICKHOUSE_DATABASE'))
|
||||
LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT());"
|
||||
LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT()) SETTINGS(check_dictionary_primary_key = 0);"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "create table join(n int, m int default dictGet('$CLICKHOUSE_DATABASE.dict1', 'm', 42::UInt64)) engine=Join(any, left, n);"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "create dictionary dict2 (n int default 0, m int DEFAULT 2)
|
||||
PRIMARY KEY n
|
||||
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'join' PASSWORD '' DB '$CLICKHOUSE_DATABASE'))
|
||||
LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT());"
|
||||
LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT()) SETTINGS(check_dictionary_primary_key = 0);"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "create table s (x default joinGet($CLICKHOUSE_DATABASE.join, 'm', 42::int)) engine=Set"
|
||||
|
||||
@ -102,7 +102,7 @@ $CLICKHOUSE_CLIENT -q "create table ${CLICKHOUSE_DATABASE}_1.xdict_src (n int, m
|
||||
$CLICKHOUSE_CLIENT -q "create dictionary ${CLICKHOUSE_DATABASE}_1.ydict1 (n int default 0, m int default 1, s String default 'qqq')
|
||||
PRIMARY KEY n
|
||||
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'xdict_src' PASSWORD '' DB '${CLICKHOUSE_DATABASE}_1'))
|
||||
LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT());"
|
||||
LIFETIME(MIN 1 MAX 10) LAYOUT(FLAT()) SETTINGS(check_dictionary_primary_key = 0);"
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "create table ${CLICKHOUSE_DATABASE}_1.zjoin(n int, m int default dictGet('${CLICKHOUSE_DATABASE}_1.ydict1', 'm', 42::UInt64)) engine=Join(any, left, n);"
|
||||
$CLICKHOUSE_CLIENT -q "drop database ${CLICKHOUSE_DATABASE}_1"
|
||||
|
@ -9,7 +9,8 @@ CREATE DICTIONARY datDictionary
|
||||
PRIMARY KEY blockNum
|
||||
SOURCE(CLICKHOUSE(TABLE 'dat'))
|
||||
LIFETIME(MIN 0 MAX 1000)
|
||||
LAYOUT(FLAT());
|
||||
LAYOUT(FLAT())
|
||||
SETTINGS(check_dictionary_primary_key = 0);
|
||||
|
||||
select (select eventTimestamp from datDictionary);
|
||||
select count(*) from dat where eventTimestamp >= (select eventTimestamp from datDictionary);
|
||||
|
@ -13,7 +13,7 @@ function get_dictionary_status()
|
||||
}
|
||||
}
|
||||
|
||||
$CLICKHOUSE_CLIENT -q "CREATE DICTIONARY dict (key Int, value String) PRIMARY KEY key SOURCE(CLICKHOUSE(TABLE data)) LAYOUT(HASHED()) LIFETIME(0)"
|
||||
$CLICKHOUSE_CLIENT -q "CREATE DICTIONARY dict (key Int, value String) PRIMARY KEY key SOURCE(CLICKHOUSE(TABLE data)) LAYOUT(HASHED()) LIFETIME(0) SETTINGS(check_dictionary_primary_key = 0)"
|
||||
uuid="$($CLICKHOUSE_CLIENT -q "SELECT uuid FROM system.dictionaries WHERE database = '$CLICKHOUSE_DATABASE' AND name = 'dict'")"
|
||||
|
||||
echo 'status before reload'
|
||||
|
@ -87,7 +87,8 @@ CREATE DICTIONARY test_dictionary_10_shards_string
|
||||
) PRIMARY KEY key
|
||||
SOURCE(CLICKHOUSE(TABLE test_table_string))
|
||||
LAYOUT(SPARSE_HASHED(SHARDS 10))
|
||||
LIFETIME(0);
|
||||
LIFETIME(0)
|
||||
SETTINGS(check_dictionary_primary_key = 0);
|
||||
|
||||
SYSTEM RELOAD DICTIONARY test_dictionary_10_shards_string; -- { serverError CANNOT_PARSE_TEXT }
|
||||
|
||||
|
@ -18,7 +18,8 @@ CREATE DICTIONARY test_dictionary
|
||||
LAYOUT(RANGE_HASHED())
|
||||
RANGE(MIN start MAX end)
|
||||
SOURCE(CLICKHOUSE(TABLE 'test_table' UPDATE_FIELD 'insert_time' UPDATE_LAG 10))
|
||||
LIFETIME(MIN 1 MAX 2);
|
||||
LIFETIME(MIN 1 MAX 2)
|
||||
SETTINGS(check_dictionary_primary_key = 0);
|
||||
|
||||
INSERT INTO test_table VALUES (1, 0, 100, '2022-12-26 11:38:34'), (1, 101, 200, '2022-12-26 11:38:34'), (2, 0, 999, '2022-12-26 11:38:34'), (2, 1000, 10000, '2022-12-26 11:38:34');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user