Repository navigation
Re-implement #117803 - #120690
Re-implement #117803#120690rschu1ze wants to merge 9 commits into
Conversation
|
Workflow [PR], commit [50bf040] Summary: ❌
|
| return setting_name == "log_comment" | ||
| /// As of today, the output format settings only affect the final output. | ||
| /// However, it should be taken with caution - we should not use these settings in deterministic SQL functions. | ||
| || setting_name.starts_with("output_format_") |
There was a problem hiding this comment.
output_format_* cannot be treated as QCC-irrelevant here. FunctionConvertSettings still snapshots getFormatSettings(context) (src/Functions/FunctionsConversion.h:153), and getFormatSettings fills output_format_decimal_trailing_zeros, output_format_trim_fixed_string, output_format_values_escape_quote_with_quote, etc. (src/Formats/FormatFactory.cpp:239-242,355). That means predicates such as toString(decimal_col) = '1.0' can change truth value when only an output_format_* setting flips. With this prefix ignore, a "no marks match" entry written under one formatting mode becomes reusable under the other, which brings back the wrong-result class this PR is trying to fix.
| /// Note: `changes()` returns the settings in random order but we must update the composite hash in deterministic order. | ||
| /// Therefore, first collect and sort the settings changes, then hash them. | ||
| std::vector<std::pair<std::string_view, String>> changed_settings_sorted; /// (name, value) | ||
| const SettingsChanges changed_settings = settings.changes(); |
There was a problem hiding this comment.
Hashing the entire Settings::changes() set here makes QCC hits depend on unrelated execution knobs and internal planning settings, not just on filter semantics. The test updates in this PR are already showing that regression: 02346_text_index_bug108519_qcc_skip_index.sql now has to pin max_block_size, max_threads, use_skip_indexes_on_data_read, and parallel_replicas_for_cluster_engines just to let an EXPLAIN reuse the same row-level entry, and 04669_query_condition_cache_lightweight_delete.sql had to stop reusing across apply_mutations_on_fly. That is a large hit-rate drop for a hot cache even when the predicate and data snapshot are unchanged. Please normalize/ignore the non-semantic settings instead of keying on the raw SettingsChanges set.
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes109 object files changed (-58.11 KiB total), 0 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units414 translation units recompiled, 3804 s compile time in total, 414 of them have a recent master baseline. |
Closes: #117186
Related: #117803
Re-implements #117803 (= reverts it + implements it properly).
Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/120690]