Skip to content

Reject WITH FILL bounds that do not fit the ORDER BY column type - #112650

Merged
alexey-milovidov merged 115 commits into
masterfrom
fix-with-fill-bounds-out-of-column-type-range
Nov 8, 2026
Merged

alexey-milovidov merged 115 commits into
masterfrom
fix-with-fill-bounds-out-of-column-type-range

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Jul 30, 2026 •

Copy link
Copy Markdown
Member

WITH FILL FROM/TO values are converted to a type wide enough for the arithmetic - Int64 for every integer column type - while the generated values are written into a column of the column's own type, which truncates whatever does not fit its range. A truncated value wraps around, so the filled stream stops being monotonic while the query plan keeps claiming that it is still sorted by the fill columns.

DISTINCT in order relies on that claim and reads the stream as a sequence of sorted runs, so it deduplicates within wrong ranges:

SELECT count() FROM (SELECT DISTINCT x, s FROM
    (SELECT toUInt8(5) AS x, 'Hello' AS s ORDER BY x ASC WITH FILL FROM 1 TO 1025));

returns 1024 instead of 257 in a release build, because WITH FILL FROM 1 TO 1025 over a UInt8 column generates 1..255, 0, 1..255, 0, .... In a debug or sanitizer build the same query aborts in DistinctSortedStreamTransform with Equal values are not contiguous within the range assumed to be sorted, which is what the AST fuzzer hit:

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109454&sha=b0030d87c1f4e4b31d2766c17286e42492a2da94&name_0=PR&name_1=AST%20fuzzer%20%28amd_msan%29
#109454

The fuzzer query is unrelated to that pull request; the abort reproduces on master:

SELECT DISTINCT x, isZeroOrNull(materialize(true)), s
FROM
(
    SELECT 5 AS x, 'Hello' AS s ORDER BY x ASC NULLS LAST WITH FILL FROM 1 TO 10 INTERPOLATE (`s` AS concat(s, 'A')) LIMIT 1048576
    UNION ALL
    SELECT 5 AS x, 'Hello' AS s ORDER BY x ASC NULLS LAST WITH FILL FROM 1 TO 1025 INTERPOLATE (`s` AS concatAssumeInjective(s, 'A')) LIMIT 1048576
)
ORDER BY s ASC;

Fix

Reject FROM/TO values that cannot be represented in the type of the ORDER BY column with INVALID_WITH_FILL_EXPRESSION, next to the existing check that rejects negative bounds for an unsigned column type. This matches how the equivalent Date/DateTime bound mismatch is already rejected (#30421).

TO is an exclusive bound, so it may still be outside of the range as long as the values that filling actually generates fit: WITH FILL FROM 0 TO 256 over a UInt8 column keeps generating 0..255, and so does WITH FILL FROM 0 TO 257 STEP 3, which stops at 255. The last generated value is known up front only when FROM and a plain numeric STEP are given. Without FROM the sequence is anchored at a data value, so which values are generated is known only at execution time: WITH FILL TO 257 STEP 3 over a UInt8 column stops at 254 when the data ends at 11 but reaches 256 when it ends at 13. An empty input generates nothing at all. So without FROM the bound is not checked up front; such a fill is checked value by value as it is generated, see below, and is rejected exactly when it would produce a value the column cannot hold. With FROM the sequence is the same for any data, so the up-front check is exact and fails fast: the per-value check alone would reject WITH FILL FROM 0 TO 4294967297 over a DateTime column only after generating 2^32 rows. An INTERVAL step over Date and DateTime cannot stop short of the boundary of the type (see below), so it always passes that boundary before it could reach a TO outside of it (on current master it wrapped around and never terminated, e.g. SELECT toDate(0) AS d ORDER BY d ASC WITH FILL FROM toDate(0) TO 70000 STEP INTERVAL 100 YEAR). With FROM, such a TO (out of range in the fill direction) is therefore rejected up front. STALENESS, which is allowed only without FROM, replaces TO as the effective bound whenever it comes first, so the sequence can stop arbitrarily far below TO and such a TO is not checked either. Float and Decimal bounds are not checked: they saturate instead of wrapping, and a Float64 bound is generally inexact in a Float32 column, so requiring exact representability there would reject ordinary queries.

For Date32 and DateTime64 the calendar arithmetic of an INTERVAL step clamps at the boundaries of the representable calendar instead of wrapping - the [0000-01-01, 9999-12-31] window of DateLUTImpl, taken in the local civil calendar of the column's time zone, which is strictly narrower than their storage type. A step that would leave the calendar returns its input unchanged, and since bc901b2 (Stop WITH FILL when the step can no longer advance the cursor) FillingRow::next ends the fill on such a step, so a TO beyond the calendar boundary just lets the fill run up to the last value it can reach (e.g. SELECT toDate32('9999-12-31') AS d ORDER BY d ASC WITH FILL TO 3000000 STEP INTERVAL 1 YEAR returns 1 row). Such a TO is therefore accepted for an INTERVAL step over these two types; only Date and DateTime, which really wrap around their storage type, keep the INTERVAL-step TO check above.

Beyond reachability, for Date32 and DateTime64 the values between the calendar boundary and the boundary of the storage type are invalid in themselves: no conversion produces them (they all clamp at the calendar boundary), yet a FROM bound in that gap is materialized into the column as is and serialized as the clamped boundary date - a spurious duplicate of the genuine boundary value next to it (e.g. SELECT d FROM (SELECT toDate32('2000-01-01') AS d ORDER BY d ASC WITH FILL FROM -719529 TO -719528 STEP INTERVAL 1 YEAR) on current master returns a 0000-01-01 row holding the day number -719529, which is not 0000-01-01). The representability check therefore tests bounds of these two types against the calendar window (in the local civil calendar of the column's time zone for DateTime64), not just the storage range: an out-of-calendar FROM is rejected for any kind of step - like a FROM out of the storage range already is - and a numeric-step TO is rejected when the last value generated under it provably lands in the gap, under the same rules as the storage range. The last-generated-value computation covers the Decimal64-carried DateTime64 bounds as well as the Int64-carried types: a numeric step over DateTime64 advances raw ticks of the column's scale, and ticks beyond the calendar do not wrap but are equally invalid (they all serialize as the clamped boundary date).

Finally, the calendar arithmetic of an INTERVAL step over Date and DateTime returns the storage type of the column, so a step whose result would leave that type wrapped around, even below a perfectly representable TO: on current master WITH FILL FROM toDateTime('2106-01-01 00:00:00', 'UTC') TO 4294967295 STEP INTERVAL 100 YEAR jumps from 2106 back to 2069 and keeps cycling below TO forever, and a step longer than the span of the type (INTERVAL 150 YEAR over DateTime) even wraps forward. Such a step is now redone in the wider calendar of Date32 (day numbers) or DateTime64(0) (seconds), which agrees with the narrow one wherever the result fits, and the result is returned as is when it does not fit the storage type (calendarStepOutOfStorageType). The sequence therefore stays monotonic: a TO within the range stops the fill at the step that passes it (the query above returns just 2106-01-01), and a value the column cannot hold is rejected by the per-value check below.

The bounds known when the transform is constructed are only half of the picture: a fill without FROM is anchored at a data value, and STALENESS places its bound at a fixed distance past the last data row, so what such a fill actually generates depends on the data. FillingRow therefore checks the runtime side as well, with the same notion of representability - the storage range plus, for Date32 and DateTime64, the calendar window. The inclusive [min, max] range of the column type is computed by fillRepresentableRangeOfColumnType and checked with two accurate Field comparisons everywhere: fillValueFitsColumnType wraps it for the construction-time checks, and on the per-generated-value path the range is precomputed once per fill column.

FillingRow::next checks every value it is about to generate and throws INVALID_WITH_FILL_EXPRESSION when the value does not fit the type of the fill column. A step that turns back - an overflow of the Int64 carrier of the integer types or of the Decimal64 ticks of DateTime64 - ends the fill like any other overshoot, because the value it overflowed from is past any border: WITH FILL FROM INT64_MAX - 1 TO INT64_MAX STEP 2 returns [INT64_MAX - 1]. A step that fails to advance (NaN, infinity, a float step below the precision at the current magnitude, or the calendar clamp of Date32/DateTime64) keeps stopping the filling, as it always did. Before the suffix is generated, when the anchor is known, a fill towards a constraint past the range of the type is also checked once with doLongJump, so WITH FILL TO 4294967297 STEP INTERVAL 1 SECOND over DateTime fails at once instead of after generating 2^32 rows. A NaN border generates nothing: the accurate Field comparison orders NaN greatest, so on current master a fill towards a NaN fill_to or a STALENESS border derived from a NaN row runs until the float step stagnates. This is the only check for fills without FROM: WITH FILL TO 257 STEP 3 over a UInt8 column stops at 254 when the data ends at 11 - a perfectly ordinary fill - but reaches 256, which the column stores as 0, when it ends at 13, and an empty input filled TO 1025 generates nothing. Rejecting the bound up front would reject the ordinary queries along with the wrapping one, so only the wrapping one is rejected, when it actually generates the value.

The STALENESS border itself is not validated - it may not even be the active bound (findBorder may discard it for a closer TO, and a border that does not advance the anchor simply generates nothing through the ordinary border cut-off), so a border past the range of the column type is fine as long as the fill never reaches a value the column cannot hold. When it does, the same per-generated-value check rejects it, including the calendar window: SELECT toDateTime64('9999-12-31 23:59:58', 0, 'UTC') AS t ORDER BY t ASC WITH FILL STALENESS 10 puts the border at the raw tick 253402300808, which fits the Decimal64 carrier but is past the last representable time point, and on current master the query returns 9999-12-31 23:59:59 nine times in a row - the out-of-calendar ticks 253402300800..807 all serialized as the clamped boundary date; with this change it throws when the fill reaches the first out-of-calendar tick.

(The DateTime64/Time64 integer-carrier hardening of convertFieldToType this PR originally carried landed on master independently, as convertWholeSecondsToDateTimeType in #118656; the tests here keep covering it.)

Changelog category

Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry

Reject WITH FILL bounds and generated values that do not fit the type of the ORDER BY column, and stop WITH FILL at a step that overflows instead of generating wrapped-around, non-monotonic, or non-terminating output.

Documentation entry

  • Documentation is not required.

Workflow [PR]
Sync PR [sync-upstream/pr/112650]

Version info

  • Merged into: 26.11.1.1695-master (included in 26.11 and later)

`WITH FILL FROM`/`TO` values are converted to a type wide enough for the
arithmetic - `Int64` for every integer column type - while the generated values
are written into a column of the column's own type, which truncates whatever
does not fit its range. A truncated value wraps around, so the filled stream
stops being monotonic while the query plan keeps claiming that it is still
sorted by the fill columns.

`DISTINCT` in order relies on that claim and reads the stream as a sequence of
sorted runs, so it deduplicates within wrong ranges:

    SELECT count() FROM (SELECT DISTINCT x, s FROM
        (SELECT toUInt8(5) AS x, 'Hello' AS s ORDER BY x ASC WITH FILL FROM 1 TO 1025))

returns 1024 instead of 257 in a release build, and in a debug or sanitizer
build it aborts with `Equal values are not contiguous within the range assumed
to be sorted` in `DistinctSortedStreamTransform`.

Reject such bounds with `INVALID_WITH_FILL_EXPRESSION`, next to the existing
check that rejects negative bounds for an unsigned column type. `TO` is an
exclusive bound, so it may still be one step outside of the range:
`WITH FILL FROM 0 TO 256` over a `UInt8` column keeps generating 0..255.

Found by the AST fuzzer:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109454&sha=b0030d87c1f4e4b31d2766c17286e42492a2da94&name_0=PR&name_1=AST%20fuzzer%20%28amd_msan%29
#109454

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [563fbf4]

Summary: ✅


AI Review

Summary

The PR prevents WITH FILL from generating values outside the fill column's range and handles overflowing arithmetic without producing wrapped, unsorted output. Reviewed head 563fbf4c9c9d94fba9bf1be149905d9d9760bb6d, the complete diff, surrounding code, and all prior discussion. No outstanding findings.

Consumers of the newly widened arithmetic fields were traced:

  • findBorder, constraint checks, and cached-walk comparisons support the wider integer and decimal fields through accurate comparisons.
  • doLongJump and shift compare overshoots against representable targets before accepting a cursor value.
  • FillingRow::next applies border and range checks before retaining a generated value, preserving existing input values at the boundary.
  • FillingTransform::insertFromFillingRow receives values that fit column storage; query-plan deserialization rebuilds step functions and representable ranges when constructing the transform.

The PR-head Fast test passed both 04657_with_fill_bounds_out_of_column_type_range and 05045_with_fill_serialized_query_plan. Twelve focused queries against that exact CI binary also produced the expected results or expected INVALID_WITH_FILL_EXPRESSION exceptions, covering exclusive bounds, arithmetic endpoints, STALENESS, multiple fill columns, and original out-of-calendar values.

Final Verdict

✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jul 30, 2026
alexey-milovidov and others added 4 commits July 31, 2026 16:21
The `TO` bound check assumed a unit step and accepted only `TO - direction` as the last value that filling can
produce, so it rejected queries where a larger `STEP` stops well before the bound:
`WITH FILL FROM 0 TO 257 STEP 3` over a `UInt8` column generates `0, 3, ..., 255`, all of which fit, but the check
threw because neither `257` nor `256` is representable.

Compute the last value that filling actually generates when it is known up front - with `FROM` and a plain numeric
step the sequence is `FROM + k * STEP` while it stays strictly before `TO`. Without `FROM` the sequence is anchored
at a data value, and an `INTERVAL` step is not a constant number of the column type units, so in those cases the
previous conservative bound is kept.
`convertFieldToType` returns Null for a value out of range of the target type, which is exactly the check that was
written by hand as an insert into a temporary column followed by a comparison.
The switch to `convertFieldToType` in the `WITH FILL` bounds check broke fills over `DateTime` and silently
disabled the check for `Date32`: the fill bounds are normalized to `Int64` fields, and `convertFieldToType` had
no `Int64` -> `DateTime` path (it threw `TYPE_MISMATCH`, failing tests like `01145_with_fill_const`), while the
`Int64` -> `Date32` path returned the value without a range check. Convert both through the underlying integer
type (`UInt32` for `DateTime`, `Int32` for `Date32`), which range-checks the value and returns Null when it does
not fit - the contract the bounds check relies on. Add `DateTime` and `Date32` cases to the test.

Failed tests: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=112650&sha=85e1516b761b26936639e392e86662f89054f43e&name_0=PR&name_1=Fast%20test
#112650

Co-Authored-By: Claude Fable 5 <[email protected]>
Comment thread src/Interpreters/convertFieldToType.cpp Resolved

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexey-milovidov alexey-milovidov self-assigned this Aug 1, 2026
@clickhouse-gh

clickhouse-gh Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 86.50% 86.50% +0.00%
Functions 91.90% 91.90% +0.00%
Branches 78.70% 78.70% +0.00%

Changed lines: Changed C/C++ lines covered: 45/48 (93.75%) · Uncovered code

Full report · Diff report

Address review: the previous commit only range-checked the `Int64` carrier
for `Date32`, while the separate `UInt64` branch below still went through
`convertNumericType<Int64>`. Positive literals and `VALUES` inputs reach the
helper as `UInt64`, so a day number like `3000000000` was accepted and then
silently truncated when materialized into a `Date32` column (`Int32` under
the hood).

Both integer carriers now share the `convertNumericType<Int32>` path, and
`gtest_convertFieldToType` covers the out-of-range `Date`, `Date32` and
`DateTime` integers in both carriers.
@clickhouse-gh

clickhouse-gh Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 563fbf4c9 with master 4a6fed194 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Object file sizes

153 object files changed (+124.38 KiB total), 0 added.

Object file Master PR Δ
src/CMakeFiles/dbms.dir/Processors/Transforms/FillingTransform.cpp.o 501.55 KiB 533.30 KiB +31.75 KiB (+6.33%)
src/CMakeFiles/dbms.dir/Interpreters/FillingRow.cpp.o 95.55 KiB 124.05 KiB +28.50 KiB (+29.83%)
src/CMakeFiles/dbms.dir/Planner/PlannerWindowFunctions.cpp.o 154.54 KiB 137.92 KiB -16.62 KiB (-10.76%)

719 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only clickhouse-bundle) and not compared.

Compile time of recompiled translation units

862 translation units recompiled, 6847 s compile time in total, 862 of them have a recent master baseline.

Job report

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 The Stateless tests (arm_binary, parallel) red on 8ce43b9 is unrelated to this PR: a background merge aborted with Bad cast from type DB::ColumnNullable to DB::ColumnString in SerializationString::serializeBinaryBulkWithSizeStream (reached from MergeTreeDataPartWriterOnDisk::initColumnsSubstreamsIfNeeded). It is tracked in #112459, and the fix is in progress in #112501. Merged master to re-run CI.

Without FROM the fill sequence is anchored at a data value, so which
values are generated is known only at execution time: WITH FILL TO 257
STEP 3 over a UInt8 column stops at 254 when the data ends at 11 but
reaches 256 when it ends at 13. The check used to assume the value
right before TO in that case, turning previously correct queries into
INVALID_WITH_FILL_EXPRESSION.

Whenever filling generates anything at all, its last value lands within
one step before TO, so reject the bound only when even the value one
whole step away from TO (clamped towards zero, so that anchors close
enough to TO to generate nothing keep being accepted) does not fit the
column type - that is, only when filling provably wraps for every
possible anchor. With an INTERVAL step and no FROM nothing can be
proven up front, so such bounds are now accepted as well.

#112650

Co-Authored-By: Claude Fable 5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 The only red on fdb7a13, Stress test (amd_debug), is unrelated to this PR: the server aborted on Logical error: Invalid number of columns in chunk pushed to OutputPort. Expected 0, found 1 in RemoteSource::prepare for the query SELECT DENSE_RANK() OVER () FROM remoteSecure('127.0.0.{3,4,5}:9440', view(SELECT DISTINCT 1 AS a)) - a window function over a remote subquery projecting a constant, where the coordinator computes an empty RemoteSource header from the only_analyze plan while the replica keeps the unused constant column. A fix is already in progress in #108045 (related issue: #103695).

…ALENESS` is present

`STALENESS` can only be used without `FROM`, and it replaces `TO` as the
effective upper bound whenever it comes first: `FillingRow::updateConstraintsWithStalenessRow`
sets the constraint to `min(fill_to, base_row + staleness)`. The sequence
therefore stops at the last data value plus the staleness, which can be
arbitrarily far below `TO`, so nothing about `TO` can be proven up front and
`SELECT toUInt8(5) AS x ORDER BY x ASC WITH FILL TO 1025 STALENESS 20` - which
stops at `24` - must not be rejected.

`fillValueRequiredToFitColumnType` now returns `nullopt` (accept) whenever
`fill_staleness` is set.
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Addressed the AI Review Major about STALENESS (commits 67f3053 + 7eac2f5) and merged master (880 commits).

On the reds of b304829675f:

  • BuzzHouse (amd_debug): report - Logical error: Sending a distributed query with unknown (zero) client version. The query context was not initialized as an initial query. Unrelated to this PR: that check was introduced on master by Throw on a distributed query with unknown client version #109408 (merged 2026-08-04), and BuzzHouse reaches it with a random distributed query shape. I did not find an issue tracking it. @groeneai, please investigate this failure and provide a fix in a separate PR; if a fix is already in progress, link it here.
  • Stress test (amd_debug): Logical error: 'column->size() == num_rows' - not reproducible from anything this PR touches (WITH FILL bound validation), and no WITH FILL query in the failure. @groeneai, please take a look at that report too.
  • Bugfix validation (unit tests): inconclusive by design - the job refuses to build the before-binary because the submodule state (contrib/musl) differs between the merge base and the checkout. Not a reproduction or a refutation, and nothing to fix in this PR.

Comment thread src/Interpreters/FillingRow.cpp Resolved
… `INT64_MAX`

`FROM` and `TO` of a `UInt64` column are converted to the `Int64` carrier, so
the step past `INT64_MAX` wrapped around and was taken for an overflow, which
stopped the filling and silently omitted valid `UInt64` values, while the same
sequence anchored at a data value was filled completely. A step from an `Int64`
cursor to a value the column can hold past `INT64_MAX` now continues as a
`UInt64`; any other step wraps around as before.

Also fix the clang-tidy `performance-no-automatic-move` error in
`FillingTransform.cpp`:
https://s3.amazonaws.com/clickhouse-test-reports/PRs/112650/68ea10984c380f7d5567c307fb02841d07be88be/pr/build_arm_tidy_4_4/build_clickhouse/build_clickhouse.log

Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexey-milovidov and others added 3 commits October 26, 2026 14:08
…DateTime64`

`tryConvertFields` builds `staleness_step_func` with the same helper as
`step_func`, so the whole-tick requirement for a fixed-length step finer
than the scale of a `DateTime64` column rejected `STALENESS` steps too,
e.g. `STALENESS INTERVAL 1 MILLISECOND` over `DateTime64(0)`, which works
on master. A `STALENESS` step is never materialized: it is an exclusive
bound after a data value, so round it away from zero to whole ticks
instead, which keeps exactly the same values before the bound.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master and pushed 43c5f0d (clean merge, the PR diff is unchanged).

The only red on 89ada51 was Stateless tests (amd_debug, sequential): 05218_text_index_substreams_opened_lazily (in_range_above_threshold 0 instead of 1, reproducible only with the randomized use_columns_cache = 1). It is unrelated to WITH FILL. It is fixed on master by abf2e19, which keeps the columns cache out of that test, and this merge pulls the fix in.

@Ergus, both of your threads from 2026-10-22 are addressed in 68ea109, with details in the thread replies. An INTERVAL fill with FROM over Date/DateTime is now walked to the storage-type boundary and rejected only when the step past it is still before TO, and the comment about the step count is corrected. Could you take another look and resolve the threads if you agree?

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master and pushed 96b2cd7. The merge was clean and the PR diff is unchanged. FillingRow.cpp and FillingTransform.cpp compile.

None of the red checks on e1173f5 are related to WITH FILL:

@groeneai, investigate the failures: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=112650&sha=e1173f5e4aeed1ad24c07718a15e6fcf97560ecd&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20parallel%29 and https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=112650&sha=e1173f5e4aeed1ad24c07718a15e6fcf97560ecd&name_0=PR&name_1=AST%20fuzzer%20%28amd_release%2C%20oracle%29, and provide fixes in separate PRs. If the fixes are already in progress (the PRs linked above), link them here.

@Ergus, both open threads from 2026-10-22 were addressed in 68ea109; the details are in the thread replies. Could you resolve them if you agree?

@groeneai

Copy link
Copy Markdown
Collaborator

Both fixes are in progress in my open PRs:

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master and pushed 36778bf. The merge was clean and the PR diff is unchanged; FillingRow.cpp and FillingTransform.cpp compile.

The only red check on 96b2cd7 was Fast test (arm_darwin): 05397_clickhouse_local_locked_path_untouched (missing Another server instance in same directory is already running on macOS). It is unrelated to WITH FILL and fixed on master by 59f220c (Skip 05397_clickhouse_local_locked_path_untouched on macOS), which this merge pulls in.

Thanks @groeneai for confirming that the other failures are tracked in #125026 and #128052.

@Ergus, both of your open threads from 2026-10-22 are addressed in 68ea109 (details in the thread replies). Could you take another look and resolve them if you agree?

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master and pushed 4327947. The merge was clean and the PR diff is unchanged. master moved FillingTransform.cpp to -WithMemoryTracking containers; the merged tree builds, and 04657_with_fill_bounds_out_of_column_type_range passes locally together with the other non-distributed WITH FILL tests. CI on 36778bf was green and all review threads are resolved. The only pending item is a re-review from @Ergus.

Comment thread src/Interpreters/FillingRow.cpp Resolved

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might look bulky, but I didn't find any issues with this logic. We just painstackingly check the bounds.

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Nov 8, 2026
Merged via the queue into master with commit 1aaec54 Nov 8, 2026
187 checks passed
@alexey-milovidov
alexey-milovidov deleted the fix-with-fill-bounds-out-of-column-type-range branch November 8, 2026 22:07
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 8, 2026
@clickgapai

Copy link
Copy Markdown
Contributor

@alexey-milovidov — ClickGap found the following in this PR:

Close anything that's wrong or already addressed.

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

Labels

comp-query-execution Runtime execution pipeline, processors, vectorized operators, resource management during execution. pr-bugfix Pull request with bugfix, not backported by default pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants