Skip to content

Enable implicit-int-float-conversion check - #94643

Merged
antonio2368 merged 9 commits into
masterfrom
enable-implicit-int-float-conversion
Jan 26, 2026
Merged

antonio2368 merged 9 commits into
masterfrom
enable-implicit-int-float-conversion

Conversation

@antonio2368

@antonio2368 antonio2368 commented Jan 20, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

This one is still acceptable when it comes to amount of changes, but it does force you to cast all parts of some expression to floating point.
So you cannot just cast one part and rely on implicit casts to floating point to handle the rest, something which is often done.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.1.1.883

@clickhouse-gh

clickhouse-gh Bot commented Jan 20, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a520cfd]

Summary: ❌

job_name test_name status info comment
Stress test (amd_debug) failure
Logical error: Block structure mismatch in A stream: different number of columns: (STID: 0993-38e6) FAIL cidb, issue
BuzzHouse (amd_debug) failure
Logical error: 'Inconsistent AST formatting: the query: (STID: 1941-1bfa) FAIL cidb, issue
Stateless tests (arm_asan, targeted) error

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jan 20, 2026
@antonio2368
antonio2368 force-pushed the enable-implicit-int-float-conversion branch 4 times, most recently from 9a702f2 to c22808e Compare January 21, 2026 09:48
@antonio2368
antonio2368 force-pushed the enable-implicit-int-float-conversion branch from c22808e to d27229d Compare January 21, 2026 14:36
@antonio2368
antonio2368 marked this pull request as ready for review January 23, 2026 12:10
@antonio2368
antonio2368 added this pull request to the merge queue Jan 26, 2026
Merged via the queue into master with commit f8aabd3 Jan 26, 2026
130 of 134 checks passed
@antonio2368
antonio2368 deleted the enable-implicit-int-float-conversion branch January 26, 2026 14:28
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jan 26, 2026
pull Bot pushed a commit to Lobinson1/ClickHouse that referenced this pull request Jul 30, 2026
TTLAggregationAlgorithm built its Aggregator::Params with
min_chunk_bytes_for_parallel_parsing in the argument slot that expects
min_hit_rate_to_use_consecutive_keys_optimization. The former is a byte
threshold defaulting to 10 MiB, the latter a hit rate in [0, 1] defaulting
to 0.5, so the threshold arrived as 10485760.0.

Aggregator::executeImpl compares cache_hit_rate (at most 1.0) against that
threshold, so use_cache was always false, Method::StateNoCache was selected,
and StateImpl<false>::hasOnlyOneValueSinceLastReset() returns false
unconditionally. That value gates the equal-key-range batching in
executeAggregateInstructions, so addBatchSinglePlace was never taken and the
consecutive keys optimization was permanently disabled for TTL GROUP BY
aggregation. This is the path that benefits most from it: execute() calls
calculateAggregates() once per run of equal keys, so every executeOnBlock
receives a single-key chunk.

Introduced by ClickHouse#57872, which added the parameter and used the correct setting
at every other call site; the narrowing conversion that would have flagged it
was later silenced by the static_cast<float> from ClickHouse#94643. Present since
v23.12.1.1368-stable. Results are not affected, only performance.

There is no parallel parsing in this file, so the now-unused
min_chunk_bytes_for_parallel_parsing extern is removed.

Measured on the added test (200000 rows, 100 keys, one aggregating TTL
merge): ProfileEvents['AggregationOptimizedEqualRangesOfKeys'] goes from 0
to 588 while count() and sum(v) stay identical.

Closes: ClickHouse#112075
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants