From eb959a1e08b7207b2997f36b1ad5ea985c0779e5 Mon Sep 17 00:00:00 2001 From: Srikanth Chekuri Date: Sun, 22 Oct 2023 11:22:33 +0530 Subject: [PATCH] Revert "Add integration tests for create_table_empty_primary_key_by_default" This reverts commit 754cfdc68c4582c95d3f1274b9d5223ca599da96. --- .../__init__.py | 0 .../test.py | 64 ------------------- 2 files changed, 64 deletions(-) delete mode 100644 tests/integration/test_settings_allow_empty_order_by/__init__.py delete mode 100644 tests/integration/test_settings_allow_empty_order_by/test.py diff --git a/tests/integration/test_settings_allow_empty_order_by/__init__.py b/tests/integration/test_settings_allow_empty_order_by/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/tests/integration/test_settings_allow_empty_order_by/test.py b/tests/integration/test_settings_allow_empty_order_by/test.py deleted file mode 100644 index 9e0e2abc0d5..00000000000 --- a/tests/integration/test_settings_allow_empty_order_by/test.py +++ /dev/null @@ -1,64 +0,0 @@ -import pytest -from helpers.client import QueryRuntimeException -from helpers.cluster import ClickHouseCluster - -cluster = ClickHouseCluster(__file__) -node = cluster.add_instance("node", stay_alive=True) - - -@pytest.fixture(scope="module", autouse=True) -def start_cluster(): - try: - cluster.start() - yield cluster - finally: - cluster.shutdown() - - -def test_create_table_without_order_by(): - with pytest.raises(QueryRuntimeException): - node.query("CREATE DATABASE IF NOT EXISTS test;") - node.query("DROP TABLE IF EXISTS test.test_empty_order_by;") - node.query( - """ - CREATE TABLE test.test_empty_order_by - ( - `a` UInt8, - ) - ENGINE = MergeTree() - SETTINGS index_granularity = 8192; - """ - ) - -def test_create_table_without_order_by_and_setting_enabled(): - node.query("CREATE DATABASE IF NOT EXISTS test;") - node.query("DROP TABLE IF EXISTS test.test_empty_order_by;") - node.query("SET create_table_empty_primary_key_by_default = true;") - node.query( - """ - CREATE TABLE test.test_empty_order_by - ( - `a` UInt8, - ) - ENGINE = MergeTree() - SETTINGS index_granularity = 8192; - """ - ) - assert "ORDER BY tuple()" in node.query(f"SHOW CREATE TABLE test.test_empty_order_by;") - -def test_create_table_without_order_by_and_setting_enabled_columwise_primary_key(): - node.query("CREATE DATABASE IF NOT EXISTS test;") - node.query("DROP TABLE IF EXISTS test.test_empty_order_by;") - node.query("SET create_table_empty_primary_key_by_default = true;") - node.query( - """ - CREATE TABLE test.test_empty_order_by - ( - `a` UInt8 PRIMARY KEY, - `b` String PRIMARY KEY - ) - ENGINE = MergeTree() - SETTINGS index_granularity = 8192; - """ - ) - assert "ORDER BY (a, b)" in node.query(f"SHOW CREATE TABLE test.test_empty_order_by") \ No newline at end of file