2021-03-09 22:56:32 +08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
|
|
from testflows.core import *
|
|
|
|
|
|
|
|
append_path(sys.path, "..")
|
|
|
|
|
|
|
|
from helpers.cluster import Cluster
|
|
|
|
from helpers.argparser import argparser
|
|
|
|
from datetime64_extended_range.requirements import *
|
|
|
|
from datetime64_extended_range.common import *
|
|
|
|
|
|
|
|
# cross-outs
|
2021-04-07 06:48:09 +08:00
|
|
|
# https://github.com/ClickHouse/ClickHouse/issues/16581#issuecomment-804360350: 128 and 256-bit types are not supported for now
|
2021-04-08 20:05:10 +08:00
|
|
|
# https://github.com/ClickHouse/ClickHouse/issues/17079#issuecomment-783396589 : leap seconds unsupported
|
2021-04-08 06:03:54 +08:00
|
|
|
# https://github.com/ClickHouse/ClickHouse/issues/22824 : dateDiff not working woth dt64
|
2021-04-08 20:05:10 +08:00
|
|
|
# https://github.com/ClickHouse/ClickHouse/issues/22852 : formatDateTime wrong value
|
|
|
|
# https://github.com/ClickHouse/ClickHouse/issues/22854 : timeSlot(), toMonday() wrong when out of normal
|
|
|
|
# https://github.com/ClickHouse/ClickHouse/issues/16260 : timeSlots(), dateDiff() not working with DT64
|
2021-04-09 21:32:10 +08:00
|
|
|
# https://github.com/ClickHouse/ClickHouse/issues/22927#issuecomment-816574952 : toRelative...Num() wrong when out of normal range
|
|
|
|
# https://github.com/ClickHouse/ClickHouse/issues/22928 : toStartOf...() wrong when out of normal range
|
|
|
|
# https://github.com/ClickHouse/ClickHouse/issues/22929 : toUnixTimestamp() exception when out of normal
|
|
|
|
# https://github.com/ClickHouse/ClickHouse/issues/22930 : toWeek()
|
2021-03-09 22:56:32 +08:00
|
|
|
|
|
|
|
xfails = {
|
2021-04-08 03:10:41 +08:00
|
|
|
"type conversion/to int 8 16 32 64 128 256/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/16581#issuecomment-804360350")],
|
|
|
|
"type conversion/to uint 8 16 32 64 256/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/16581#issuecomment-804360350")],
|
|
|
|
"non existent time/leap seconds/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/17079#issuecomment-783396589")],
|
2021-04-08 06:03:54 +08:00
|
|
|
"date time funcs/date diff/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22824")],
|
2021-04-08 20:05:10 +08:00
|
|
|
"date time funcs/format date time/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22852")],
|
|
|
|
"date time funcs/time slot/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22854")],
|
|
|
|
"date time funcs/to monday/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22854")],
|
|
|
|
"date time funcs/time slots/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/16260")],
|
2021-04-09 21:32:10 +08:00
|
|
|
"date time funcs/to relative :/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22927#issuecomment-816574952")],
|
|
|
|
"date time funcs/to start of :/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22928")],
|
|
|
|
"date time funcs/to unix timestamp/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22929")],
|
|
|
|
"date time funcs/to week/:": [(Fail, "https://github.com/ClickHouse/ClickHouse/issues/22930")],
|
2021-03-09 22:56:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@TestModule
|
|
|
|
@Name("datetime64 extended range")
|
|
|
|
@ArgumentParser(argparser)
|
|
|
|
@Specifications(
|
|
|
|
QA_SRS010_ClickHouse_DateTime64_Extended_Range
|
|
|
|
)
|
|
|
|
@Requirements(
|
|
|
|
RQ_SRS_010_DateTime64_ExtendedRange("1.0"),
|
|
|
|
)
|
|
|
|
@XFails(xfails)
|
|
|
|
def regression(self, local, clickhouse_binary_path, parallel=False, stress=False):
|
|
|
|
"""ClickHouse DateTime64 Extended Range regression module.
|
|
|
|
"""
|
|
|
|
nodes = {
|
|
|
|
"clickhouse": ("clickhouse1", "clickhouse2", "clickhouse3"),
|
|
|
|
}
|
|
|
|
|
|
|
|
with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster:
|
|
|
|
self.context.cluster = cluster
|
|
|
|
self.context.parallel = parallel
|
|
|
|
self.context.stress = stress
|
|
|
|
|
|
|
|
Scenario(run=load("datetime64_extended_range.tests.generic", "generic"), flags=TE)
|
|
|
|
Scenario(run=load("datetime64_extended_range.tests.non_existent_time", "feature"), flags=TE)
|
|
|
|
Scenario(run=load("datetime64_extended_range.tests.reference_times", "reference_times"), flags=TE)
|
|
|
|
Scenario(run=load("datetime64_extended_range.tests.date_time_functions", "date_time_funcs"), flags=TE)
|
|
|
|
Scenario(run=load("datetime64_extended_range.tests.type_conversion", "type_conversion"), flags=TE)
|
|
|
|
|
|
|
|
if main():
|
|
|
|
regression()
|