crate/crate
在 GitHub 查看Support marking literal characters with double quotes in `to_char` template pattern
Open
#19,291 建立於 2026年4月23日
contributions welcomefeature: sql: scalarsgood first issue
描述
CrateDB version
nightly
CrateDB setup information
Docker standard.
Problem
Hi. Until yesterday, the TO_CHAR function produced a valid outcome per nightly build 105c4f3. Starting today, with build 6dc60f5, the function produces an invalid outcome.
2005-05-28THH:57:00Z indicates the timestamp formatting pattern HH somehow makes it through into the formatted string, which effectively produced such an error message on a downstream integration test case exercised by the Fivetran SDK tester within the test suite of the cratedb-fivetran-destination project:
SEVERE ⚡ debugger Failed to process file: schema_migrations_input_sync_modes.json - Partner Sdk Warning. Message:
`operation_timestamp` 2005-05-28T20:57:00Z must be on or after `max(_fivetran_start)` 2005-05-28THH:57:00Z
Evaluation
Possibly, one of the recent changes to the TO_CHAR function 9adcd82 or 6dc60f5 was detrimental.
Steps to Reproduce
SELECT TO_CHAR(MAX('2005-05-28T20:57:00Z'), 'YYYY-MM-DDTHH:MI:SSZ');
Actual Result
+----------------------+
| to_char |
+----------------------+
| 2005-05-28THH:57:00Z |
+----------------------+
Expected Result
+----------------------+
| to_char |
+----------------------+
| 2005-05-28T08:57:00Z |
+----------------------+