From 232887ea6c46a20c27e55adc874f0f67b78fc7c2 Mon Sep 17 00:00:00 2001 From: Kseniia Sumarokova <54203879+kssenii@users.noreply.github.com> Date: Mon, 17 Jan 2022 16:39:53 +0300 Subject: [PATCH] Update test.py --- tests/integration/test_hive_query/test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_hive_query/test.py b/tests/integration/test_hive_query/test.py index 058a89bf8f6..a68ae0b066d 100644 --- a/tests/integration/test_hive_query/test.py +++ b/tests/integration/test_hive_query/test.py @@ -29,6 +29,7 @@ def test_create_parquet_table(started_cluster): node = started_cluster.instances['h0_0_0'] node.query("set input_format_parquet_allow_missing_columns = true") result = node.query(""" + DROP TABLE IF EXISTS default.demo_parquet; CREATE TABLE default.demo_parquet (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo') PARTITION BY(day) """) logging.info("create result {}".format(result)) @@ -39,6 +40,7 @@ def test_create_orc_table(started_cluster): logging.info('Start testing creating hive table ...') node = started_cluster.instances['h0_0_0'] result = node.query(""" + DROP TABLE IF EXISTS default.demo_orc; CREATE TABLE default.demo_orc (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo_orc') PARTITION BY(day) """) logging.info("create result {}".format(result)) @@ -49,6 +51,7 @@ def test_create_text_table(started_cluster): logging.info('Start testing creating hive table ...') node = started_cluster.instances['h0_0_0'] result = node.query(""" + DROP TABLE IF EXISTS default.demo_text; CREATE TABLE default.demo_text (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo_text') PARTITION BY (tuple()) """) logging.info("create result {}".format(result)) @@ -108,7 +111,8 @@ def test_cache_read_bytes(started_cluster): node = started_cluster.instances['h0_0_0'] node.query("set input_format_parquet_allow_missing_columns = true") result = node.query(""" - CREATE TABLE IF NOT EXISTS default.demo_parquet (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo') PARTITION BY(day) + DROP TABLE IF EXISTS default.demo_parquet; + CREATE TABLE default.demo_parquet (`id` Nullable(String), `score` Nullable(Int32), `day` Nullable(String)) ENGINE = Hive('thrift://hivetest:9083', 'test', 'demo') PARTITION BY(day) """) result = node.query(""" SELECT day, count(*) FROM default.demo_parquet group by day order by day