Skip to content

Commit 95c5567

Browse files
authored
date64 test skip for 24-4 (#21609)
1 parent dba2e10 commit 95c5567

File tree

2 files changed

+42
-19
lines changed

2 files changed

+42
-19
lines changed

ydb/tests/compatibility/test_compatibility.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,20 @@ def create_table(self, store_type):
8888
upsert_and_check_sum(self, iteration_count=2, start_index=100)
8989
assert self.execute_scan_query('select count(*) as row_count from `sample_table`')[0]['row_count'] == 500, 'Expected 500 rows: update 100-200 rows and added 300 rows'
9090

91-
@pytest.mark.parametrize("store_type, date_args", [
92-
pytest.param("row", ["--datetime-types=dt32"], id="row"),
93-
pytest.param("column", ["--datetime-types=dt32"], id="column"),
94-
pytest.param("column", ["--datetime-types=dt64"], id="column-date64")
91+
@pytest.mark.parametrize("store_type, date64", [
92+
pytest.param("row", False, id="row"),
93+
pytest.param("column", False, id="column"),
94+
pytest.param("column", True, id="column-date64")
9595
])
96-
def test_tpch1(self, store_type, date_args):
96+
def test_tpch1(self, store_type, date64):
97+
if date64 and min(self.versions) < (25, 1):
98+
pytest.skip("date64 is not supported in 24-4")
99+
100+
if date64:
101+
date_args = ["--datetime-types=dt64"]
102+
else:
103+
date_args = ["--datetime-types=dt32"]
104+
97105
result_json_path = os.path.join(yatest.common.test_output_path(), "result.json")
98106
query_output_path = os.path.join(yatest.common.test_output_path(), "query_output.json")
99107
init_command = [
@@ -109,8 +117,7 @@ def test_tpch1(self, store_type, date_args):
109117
"init",
110118
"--store={}".format(store_type),
111119
"--partition-size=25",
112-
] + date_args # use 32 bit dates instead of 64 (not supported in 24-4)]
113-
120+
] + date_args
114121
import_command = [
115122
yatest.common.binary_path(os.getenv("YDB_CLI_BINARY")),
116123
"--verbose",

ydb/tests/compatibility/test_stress.py

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,20 @@ def test_kv(self, store_type):
179179
yatest.common.execute(init_command, wait=True, stdout=self.output_f, stderr=self.output_f)
180180
yatest.common.execute(run_command, wait=True, stdout=self.output_f, stderr=self.output_f)
181181

182-
@pytest.mark.parametrize("store_type, date_args", [
183-
pytest.param("row", ["--datetime-types=dt32"], id="row"),
184-
pytest.param("column", ["--datetime-types=dt32"], id="column"),
185-
pytest.param("column", ["--datetime-types=dt64"], id="column-date64")
182+
@pytest.mark.parametrize("store_type, date64", [
183+
pytest.param("row", False, id="row"),
184+
pytest.param("column", False, id="column"),
185+
pytest.param("column", True, id="column-date64")
186186
])
187-
def test_tpch1(self, store_type, date_args):
187+
def test_tpch1(self, store_type, date64):
188+
if date64 and min(self.versions) < (25, 1):
189+
pytest.skip("date64 is not supported in 24-4")
190+
191+
if date64:
192+
date_args = ["--datetime-types=dt64"]
193+
else:
194+
date_args = ["--datetime-types=dt32"]
195+
188196
init_command = [
189197
yatest.common.binary_path(os.getenv("YDB_CLI_BINARY")),
190198
"--verbose",
@@ -198,7 +206,7 @@ def test_tpch1(self, store_type, date_args):
198206
"init",
199207
"--store={}".format(store_type),
200208
"--partition-size=25",
201-
] + date_args # use 32 bit dates instead of 64 (not supported in 24-4)]
209+
] + date_args
202210
import_command = [
203211
yatest.common.binary_path(os.getenv("YDB_CLI_BINARY")),
204212
"--verbose",
@@ -235,12 +243,20 @@ def test_tpch1(self, store_type, date_args):
235243
yatest.common.execute(run_command, wait=True, stdout=self.output_f, stderr=self.output_f)
236244

237245
@pytest.mark.skip(reason="Not stabilized yet")
238-
@pytest.mark.parametrize("store_type, date_args", [
239-
pytest.param("row", ["--datetime-types=dt32"], id="row"),
240-
pytest.param("column", ["--datetime-types=dt32"], id="column"),
241-
pytest.param("column", ["--datetime-types=dt64"], id="column-date64")
246+
@pytest.mark.parametrize("store_type, date64", [
247+
pytest.param("row", False, id="row"),
248+
pytest.param("column", False, id="column"),
249+
pytest.param("column", True, id="column-date64")
242250
])
243-
def test_tpcds1(self, store_type, date_args):
251+
def test_tpcds1(self, store_type, date64):
252+
if date64 and min(self.versions) < (25, 1):
253+
pytest.skip("date64 is not supported in 24-4")
254+
255+
if date64:
256+
date_args = ["--datetime-types=dt64"]
257+
else:
258+
date_args = ["--datetime-types=dt32"]
259+
244260
init_command = [
245261
yatest.common.binary_path(os.getenv("YDB_CLI_BINARY")),
246262
"--verbose",
@@ -254,7 +270,7 @@ def test_tpcds1(self, store_type, date_args):
254270
"init",
255271
"--store={}".format(store_type),
256272
"--partition-size=25",
257-
] + date_args # use 32 bit dates instead of 64 (not supported in 24-4)]
273+
] + date_args
258274
import_command = [
259275
yatest.common.binary_path(os.getenv("YDB_CLI_BINARY")),
260276
"--verbose",

0 commit comments

Comments
 (0)