Skip to content

Cherry pick #128048 to 26.8: Restore JSONExtract DateTime parsing under old compatibility - #128378

Merged
robot-clickhouse-ci-1 merged 5 commits into
backport/26.8/128048from
cherrypick/26.8/128048
Nov 1, 2026
Merged

robot-clickhouse-ci-1 merged 5 commits into
backport/26.8/128048from
cherrypick/26.8/128048

Conversation

@robot-ch-test-poll3

Copy link
Copy Markdown
Contributor

Original pull-request #128048

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

fm4v added 4 commits October 28, 2026 12:01
#109252 made the `JSONExtract` family parse `DateTime` values according to `cast_string_to_date_time_mode` instead of `date_time_input_format`, without a compatibility gate. When `compatibility` is below 26.5, `cast_string_to_date_time_mode` is `basic`, so with `date_time_input_format = 'best_effort'` set explicitly, ISO 8601 values like `2026-10-19T07:30:26.743Z` silently become `1970-01-01 00:00:00.000` after the upgrade to 26.8, and materialized views write epoch values.

Add the setting `json_extract_use_cast_string_to_date_time_mode`, enabled by default and disabled by `compatibility` with versions before 26.8.
…compat

Restore JSONExtract DateTime parsing under old compatibility
@robot-ch-test-poll3 robot-ch-test-poll3 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Oct 31, 2026
…rypick/26.8/128048

# Conflicts:
#	src/Core/Settings.cpp
#	src/Functions/FunctionsJSON.cpp
#	src/Interpreters/Cache/QueryConditionCache.cpp
@robot-clickhouse-ci-1
robot-clickhouse-ci-1 merged commit 3d908e7 into backport/26.8/128048 Nov 1, 2026
1 check passed
@robot-clickhouse-ci-1
robot-clickhouse-ci-1 deleted the cherrypick/26.8/128048 branch November 1, 2026 09:50
@fm4v

fm4v commented Nov 1, 2026

Copy link
Copy Markdown
Member

Resolved conflicts. The QueryConditionCache.cpp hunk is not included: 26.8 has no queryConditionCacheSettingsSalt (added by #117803, not backported), and the query condition cache on 26.8 does not key on any function-captured setting, date_time_input_format and cast_string_to_date_time_mode included. The fix itself (the json_extract_use_cast_string_to_date_time_mode setting, the FunctionsJSON.cpp change, and the test) is backported as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants