Commit Graph

7 Commits

Author SHA1 Message Date
Robert Schulze
72b9d75a84
Add compat setting for non-const timezones
SQL function toTimezone() converts a Date or DateTime into another
timezone. The problem is that the timezone is part of the Date /
DateTime type but not part of the internal representation (value). This
led to the fact that toTimeZone() wqith non-const timezones produced
wrong and misleading results until #48471 (shipped with v23.4) enforced
a const timezone.

Unfortunately, this PR also broke existing table definitions with
non-const timezones, e.g. in ALIAS expressions. So while #48471
addressed the issue appropriately, it is really backwards-incompatible.

This PR adds a setting to toggle the behavior and makes it also part of
the compatibility profile.
2023-06-10 16:56:42 +00:00
Roman Vasin
e0099d52de Use C++20 format() syntax for exceptions 2022-09-29 14:07:02 +00:00
Roman Vasin
53b34c7e0a Put enable_extended_results_for_datetime_functions into private; correct if/else braces 2022-09-29 11:04:13 +00:00
Roman Vasin
22ccce6946 Remove WithContext; Rename execute_extended_result to executeExtendedResult 2022-09-29 09:29:07 +00:00
Roman Vasin
e66e70870a Fix timezone issues 2022-09-28 16:05:59 +00:00
Roman Vasin
f6ebd94ce1 Add execute_extended_result for Date32 argument 2022-09-22 07:07:04 +00:00
Roman Vasin
30c4719f7b Add FunctionDateOrDateTimeToDateTimeOrDateTime64; function toStartOfHour works 2022-09-21 12:58:57 +00:00