From b3e4319fc0a63426179b87a7001f4978c7da2ddc Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 13 Oct 2019 01:25:26 +0300 Subject: [PATCH] Set allow_suspicious_low_cardinality_types for LowCardinality tests This setting has been introduced in v19.9.2.4-stable (all previous tags marked as -testing, so I think they should be skipped). Refs: ClickHouse/ClickHouse@4819a3439451ea69fb2a3a8779c003a137c07e59 Refs: ClickHouse/ClickHouse#5448 --- .travis.yml | 4 +++- tests/columns/test_low_cardinality.py | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e16a5f74..8cd14164 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ env: - - VERSION=19.8.3.8 # SimpleAggregateFunction + - VERSION=19.15.3.6 # latest + - VERSION=19.9.2.4 # allow_suspicious_low_cardinality_types + - VERSION=19.8.3.8 # SimpleAggregateFunction - VERSION=19.3.3 - VERSION=18.12.17 - VERSION=18.12.13 diff --git a/tests/columns/test_low_cardinality.py b/tests/columns/test_low_cardinality.py index e2740ca5..69433066 100644 --- a/tests/columns/test_low_cardinality.py +++ b/tests/columns/test_low_cardinality.py @@ -151,3 +151,10 @@ def test_fixed_string(self): inserted = self.client.execute(query) self.assertEqual(inserted, data) + + def create_table(self, columns, **kwargs): + # allow_suspicious_low_cardinality_types introduced in v19.9.2.4-stable + if self.client.connection.server_info.version_tuple() >= (19, 9, 2): + kwargs['allow_suspicious_low_cardinality_types'] = 1 + return super(LowCardinalityTestCase, self).create_table(columns, + **kwargs)