makeDateTime64(): Allow non-const fraction argument

This commit is contained in:
Robert Schulze 2024-01-08 11:58:32 +00:00
parent 6665d23243
commit f3c77c046a
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
3 changed files with 5 additions and 1 deletions

View File

@ -434,7 +434,7 @@ public:
};
FunctionArgumentDescriptors optional_args{
{optional_argument_names[0], &isNumber<IDataType>, isColumnConst, "const Number"},
{optional_argument_names[0], &isNumber<IDataType>, nullptr, "const Number"},
{optional_argument_names[1], &isNumber<IDataType>, isColumnConst, "const Number"},
{optional_argument_names[2], &isString<IDataType>, isColumnConst, "const String"}
};

View File

@ -67,3 +67,4 @@ DateTime64(7, \'UTC\')
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
1900-01-01 00:00:00.000
2024-01-08 11:12:13.014

View File

@ -82,6 +82,9 @@ select makeDateTime64(1991, 8, 24, 65537, 4, 0);
select makeDateTime64(1991, 8, 24, 21, 65537, 0);
select makeDateTime64(1991, 8, 24, 21, 4, 65537);
-- bug 58590
select makeDateTime64(2024, 1, 8, 11, 12, 13, materialize(14));
select makeDateTime64(year, 1, 1, 1, 0, 0, 0, precision, timezone) from (
select 1984 as year, 5 as precision, 'UTC' as timezone
union all