Repository navigation
Backport #114912 to 26.3: Revert "Revert "Fix propagation of settings in accurateCastOrDefault"" - #115536
Merged
Conversation
… in `accurateCastOrDefault`""
Contributor
|
Workflow [BackportPR], commit [6905ebe] Summary: ✅ |
…lt fix
The backported `getSourceNullMap` helper in `castOrDefault.cpp` calls
`ColumnVariant::createNullMap`, which was introduced on master by an
unrelated, unbackported commit ("Fix `toFloat64`/`toUInt32`/`toString`/etc.
on Dynamic ignoring `cast_keep_nullable`"), so the build failed with
`no member named 'createNullMap' in 'DB::ColumnVariant'`.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Two parts of the backported tests exercise behaviour that comes from other `master` changes which are not present in `26.3`: - `04510_accurateCastOrDefault_settings` checked that `CAST` to `DateTime` / `DateTime64` without an explicit time zone picks up the time zone of the source column. That substitution lives in `CastOverloadResolverImpl` on `master` only, so the checks are removed here. - `04512_accurateCastOrDefault_nullable_target` checked `Dynamic` and `LowCardinality(Nullable(...))` as `accurateCastOrDefault` targets. On this branch the `accurateCastOrNull` resolver still wraps every non-`Variant` target in `Nullable`, so such a target is rejected with `ILLEGAL_TYPE_OF_ARGUMENT` exactly as it was before this backport. Only the `Variant` target, which the resolver accepts, is kept.
alexey-milovidov
added a commit
that referenced
this pull request
Aug 24, 2026
The tests backported with #114912 assert behavior that comes from other, unbackported master changes: - `04510_accurateCastOrDefault_settings`: the time-zone substitution block needs master's `substituteTimeZoneInDateTimeType` in `CastOverloadResolverImpl`. - `04512_accurateCastOrDefault_nullable_target`: the `Dynamic` and `LowCardinality(Nullable(...))` targets need master's `canContainNull` check in `CastOverloadResolverImpl::getReturnTypeImpl` (25.8 still has `isVariant`, so `makeNullable(Dynamic)` throws ILLEGAL_TYPE_OF_ARGUMENT). Same trim as the 26.3 backport #115536. Both trimmed tests verified locally against this PR's own CI binary (25.8.33.1). CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=115535&sha=a4fa72b7604c3af05e53398053eaa63f87bbadd9&name_0=BackportPR PR: #115535 Co-Authored-By: Claude Fable 5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original pull-request #114912
This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.
The PR source
The PR is created in the CI job
Version info
26.3.23.3