Skip to content

Backport #114912 to 26.3: Revert "Revert "Fix propagation of settings in accurateCastOrDefault"" - #115536

Merged
alexey-milovidov merged 5 commits into
26.3from
backport/26.3/114912
Aug 26, 2026
Merged

alexey-milovidov merged 5 commits into
26.3from
backport/26.3/114912

Conversation

@robot-ch-test-poll4

@robot-ch-test-poll4 robot-ch-test-poll4 commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Merged into: 26.3.23.3

@robot-ch-test-poll4 robot-ch-test-poll4 added pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default labels Aug 20, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [6905ebe]

Summary: ✅

Avogar and others added 3 commits August 20, 2026 13:53
…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]>
@alexey-milovidov
alexey-milovidov merged commit 00daab1 into 26.3 Aug 26, 2026
34 checks passed
@alexey-milovidov
alexey-milovidov deleted the backport/26.3/114912 branch August 26, 2026 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backport Changes, backported to release branch. Do not use manually - automated use only! pr-bugfix Pull request with bugfix, not backported by default

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants