mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Automatic style fix
This commit is contained in:
parent
4d2a5d752d
commit
08af2a32bf
@ -5,6 +5,7 @@ from helpers.cluster import ClickHouseCluster
|
||||
cluster = ClickHouseCluster(__file__)
|
||||
node = cluster.add_instance("node", stay_alive=True)
|
||||
|
||||
|
||||
@pytest.fixture(scope="module", autouse=True)
|
||||
def started_cluster():
|
||||
try:
|
||||
@ -16,23 +17,42 @@ def started_cluster():
|
||||
|
||||
|
||||
def test_compressed_marks_restart_compact():
|
||||
node.query("create table test_02381_compact (a UInt64, b String) ENGINE = MergeTree order by (a, b)")
|
||||
node.query(
|
||||
"create table test_02381_compact (a UInt64, b String) ENGINE = MergeTree order by (a, b)"
|
||||
)
|
||||
node.query("insert into test_02381_compact values (1, 'Hello')")
|
||||
node.query("alter table test_02381_compact modify setting compress_marks=true, compress_primary_key=true")
|
||||
node.query(
|
||||
"alter table test_02381_compact modify setting compress_marks=true, compress_primary_key=true"
|
||||
)
|
||||
node.query("insert into test_02381_compact values (2, 'World')")
|
||||
node.query("optimize table test_02381_compact final")
|
||||
|
||||
assert node.query("SELECT count() FROM test_02381_compact WHERE not ignore(*)") == "2\n"
|
||||
assert (
|
||||
node.query("SELECT count() FROM test_02381_compact WHERE not ignore(*)")
|
||||
== "2\n"
|
||||
)
|
||||
node.restart_clickhouse()
|
||||
assert node.query("SELECT count() FROM test_02381_compact WHERE not ignore(*)") == "2\n"
|
||||
assert (
|
||||
node.query("SELECT count() FROM test_02381_compact WHERE not ignore(*)")
|
||||
== "2\n"
|
||||
)
|
||||
|
||||
|
||||
def test_compressed_marks_restart_wide():
|
||||
node.query("create table test_02381_wide (a UInt64, b String) ENGINE = MergeTree order by (a, b) SETTINGS min_bytes_for_wide_part=0")
|
||||
node.query(
|
||||
"create table test_02381_wide (a UInt64, b String) ENGINE = MergeTree order by (a, b) SETTINGS min_bytes_for_wide_part=0"
|
||||
)
|
||||
node.query("insert into test_02381_wide values (1, 'Hello')")
|
||||
node.query("alter table test_02381_wide modify setting compress_marks=true, compress_primary_key=true")
|
||||
node.query(
|
||||
"alter table test_02381_wide modify setting compress_marks=true, compress_primary_key=true"
|
||||
)
|
||||
node.query("insert into test_02381_wide values (2, 'World')")
|
||||
node.query("optimize table test_02381_wide final")
|
||||
|
||||
assert node.query("SELECT count() FROM test_02381_wide WHERE not ignore(*)") == "2\n"
|
||||
assert (
|
||||
node.query("SELECT count() FROM test_02381_wide WHERE not ignore(*)") == "2\n"
|
||||
)
|
||||
node.restart_clickhouse()
|
||||
assert node.query("SELECT count() FROM test_02381_wide WHERE not ignore(*)") == "2\n"
|
||||
assert (
|
||||
node.query("SELECT count() FROM test_02381_wide WHERE not ignore(*)") == "2\n"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user