adjust test test_seekable_formats

This commit is contained in:
Sema Checherinda 2023-03-03 13:16:46 +01:00
parent 7a9f4aab8e
commit bc8b34f74b

View File

@ -1056,13 +1056,13 @@ def test_seekable_formats(started_cluster):
table_function = f"s3(s3_orc, structure='a Int32, b String', format='ORC')" table_function = f"s3(s3_orc, structure='a Int32, b String', format='ORC')"
exec_query_with_retry( exec_query_with_retry(
instance, instance,
f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1000000) settings s3_truncate_on_insert=1", f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1500000) settings s3_truncate_on_insert=1",
) )
result = instance.query( result = instance.query(
f"SELECT count() FROM {table_function} SETTINGS max_memory_usage='50M'" f"SELECT count() FROM {table_function} SETTINGS max_memory_usage='60M'"
) )
assert int(result) == 1000000 assert int(result) == 1500000
instance.query(f"SELECT * FROM {table_function} FORMAT Null") instance.query(f"SELECT * FROM {table_function} FORMAT Null")
@ -1073,7 +1073,7 @@ def test_seekable_formats(started_cluster):
result = result.strip() result = result.strip()
assert result.endswith("MiB") assert result.endswith("MiB")
result = result[: result.index(".")] result = result[: result.index(".")]
assert int(result) > 80 assert int(result) > 150
def test_seekable_formats_url(started_cluster): def test_seekable_formats_url(started_cluster):
@ -1083,23 +1083,23 @@ def test_seekable_formats_url(started_cluster):
table_function = f"s3(s3_parquet, structure='a Int32, b String', format='Parquet')" table_function = f"s3(s3_parquet, structure='a Int32, b String', format='Parquet')"
exec_query_with_retry( exec_query_with_retry(
instance, instance,
f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1000000) settings s3_truncate_on_insert=1", f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1500000) settings s3_truncate_on_insert=1",
) )
result = instance.query(f"SELECT count() FROM {table_function}") result = instance.query(f"SELECT count() FROM {table_function}")
assert int(result) == 1000000 assert int(result) == 1500000
table_function = f"s3(s3_orc, structure='a Int32, b String', format='ORC')" table_function = f"s3(s3_orc, structure='a Int32, b String', format='ORC')"
exec_query_with_retry( exec_query_with_retry(
instance, instance,
f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1000000) settings s3_truncate_on_insert=1", f"insert into table function {table_function} SELECT number, randomString(100) FROM numbers(1500000) settings s3_truncate_on_insert=1",
) )
table_function = f"url('http://{started_cluster.minio_host}:{started_cluster.minio_port}/{bucket}/test_parquet', 'Parquet', 'a Int32, b String')" table_function = f"url('http://{started_cluster.minio_host}:{started_cluster.minio_port}/{bucket}/test_parquet', 'Parquet', 'a Int32, b String')"
result = instance.query( result = instance.query(
f"SELECT count() FROM {table_function} SETTINGS max_memory_usage='50M'" f"SELECT count() FROM {table_function} SETTINGS max_memory_usage='60M'"
) )
assert int(result) == 1000000 assert int(result) == 1500000
def test_empty_file(started_cluster): def test_empty_file(started_cluster):