mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 09:32:01 +00:00
Allow backward incompatible change for toDate32 since it was declared as such in 22.8
This commit is contained in:
parent
58da0398a0
commit
790cfe2b7e
@ -143,6 +143,10 @@ def test_string_functions(start_cluster):
|
||||
"substring",
|
||||
"CAST",
|
||||
# NOTE: no need to ignore now()/now64() since they will fail because they don't accept any argument
|
||||
|
||||
# 22.8 Backward Incompatible Change: Extended range of Date32
|
||||
"toDate32OrZero",
|
||||
"toDate32OrDefault"
|
||||
]
|
||||
functions = filter(lambda x: x not in excludes, functions)
|
||||
|
||||
@ -153,14 +157,15 @@ def test_string_functions(start_cluster):
|
||||
failed = 0
|
||||
passed = 0
|
||||
|
||||
def get_function_value(node, function_name, value="foo"):
|
||||
def get_function_value(node, function_name, value):
|
||||
return node.query(f"select {function_name}('{value}')").strip()
|
||||
|
||||
v = "foo"
|
||||
for function in functions:
|
||||
logging.info("Checking %s", function)
|
||||
logging.info("Checking %s('%s')", function, v)
|
||||
|
||||
try:
|
||||
backward_value = get_function_value(backward, function)
|
||||
backward_value = get_function_value(backward, function, v)
|
||||
except QueryRuntimeException as e:
|
||||
error_message = str(e)
|
||||
allowed_errors = [
|
||||
@ -203,11 +208,12 @@ def test_string_functions(start_cluster):
|
||||
failed += 1
|
||||
continue
|
||||
|
||||
upstream_value = get_function_value(upstream, function)
|
||||
upstream_value = get_function_value(upstream, function, v)
|
||||
if upstream_value != backward_value:
|
||||
logging.info(
|
||||
"Failed %s, %s (backward) != %s (upstream)",
|
||||
logging.warning(
|
||||
"Failed %s('%s') %s (backward) != %s (upstream)",
|
||||
function,
|
||||
v,
|
||||
backward_value,
|
||||
upstream_value,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user