Repository navigation
Apply -WithMemoryTracking containers to src/Processors/QueryPlan - #129617
Conversation
Converts the standard containers in `src/Processors/QueryPlan` and adds the directory to the style check. Starts from the `QueryPlan` part of the earlier whole-`src/Processors` branch, with master's newer code converted the same way. Types are propagated to their owners where they cross the directory boundary: `ActionsDAG`, `ExpressionActions`, `JoinOperator`, `JoinExpressionActions`, `MergeTreeWhereOptimizer`, `ClusterProxy::executeQuery`, `distributedIndexAnalysis`, `SelectQueryInfo`, `SetSerialization`, `ParallelReplicasReadingCoordinator`, `RelationProfile`, `RuntimeFilterReadRangesRefiner`, `MergeTreeIndexBuildContext`, the `unitePlans` callers and `PartitionIdToMaxBlock`. Where the owner is shared more widely (`KeyDescription::reverse_flags`, `KeyCondition::Description::used_keys`, `MergeTreeDataSelectExecutor::filterPartsByVirtualColumns`, the posting list cursors, settings that convert only to `std::vector`), the usage is marked with `STYLE_CHECK_ALLOW_STD_CONTAINERS` and the reason, instead of copying. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
|
Workflow [PR], commit [c43b9eb] Summary: ✅
AI ReviewSummaryConverts query-plan containers and their callers to memory-tracking allocators. Review found one pre-existing, client-reachable null dereference in the modified Findings❌ Blockers
Tests
Final VerdictStatus: ❌ Block. Enforce the child-order invariant with regression coverage, or link a tracking issue for the pre-existing defect if its fix is kept separate. |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes484 object files changed (+461.52 KiB total), 0 added.
711 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Slowest function optimization changes (ThinLTO)Median per-function time ratio to the master baseline:
Compile time of recompiled translation units1837 translation units recompiled, 12217 s compile time in total, 1837 of them have a recent master baseline. |
…y_plan Conflicts in `FragmentGraphTree.cpp` and `TextCanvas`: kept master's new `details` parameter and used `VectorWithMemoryTracking` for it. Also converted the containers master added in `useShuffleForOrderByRand.cpp`, `shortCircuitConstantFalseJoin.cpp`, `FilterStep.cpp`, `ReadFromMergeTree.cpp` and `Serialization.cpp`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
Master added the same `ListWithMemoryTracking.h` and `VectorWithMemoryTracking.h` includes to `QueryPlan.h` and `ActionsDAG.cpp`, which `clang-tidy` reports as `readability-duplicate-include`. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=129617&sha=latest&name_0=PR #129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…y_plan Conflicts in `ActionsDAG.h` and `ExpressionJIT.cpp`: kept master's new `getCompiledFunctions` and `UnorderedSetWithMemoryTracking` for the `compileExpressions` argument. Also converted the containers master added in `Optimizations/Utils.cpp`, and removed an include of `StorageFile.h` that master now has too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
The 54 files in `src/Processors/QueryPlan/Optimizations` whose changes do not depend on any changed header go to their own PR, so both are smaller to review. The `QueryPlan` entry of the std containers check moves to whichever of the two merges last: neither of them alone converts the whole directory. #129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…y_plan Master moved the `ActionsDAG` traversals to `ActionsDAGTraversal.h`; the conflicts in `ActionsDAG.cpp`, `FilterStep.cpp`, `actionsDAGUtils.cpp` and `filterPushDown.cpp` take master's code with the tracked containers it still declares. The other conflicts are in `IQueryPlanStep.cpp` includes, `ReadFromMergeTree.h` and `optimizeUseAggregateProjection.cpp`. Also converted the containers master added in `RelationEstimateInfo.h`, `JoinStepLogical.cpp`, `ReadFromMergeTree.cpp`, `Cascades/Properties.cpp` and `lowerArrayJoinFunction.cpp`, and the `getCompilableDAG` declaration master added to `JIT/CompileDAG.h`. The new `Cascades` window rule follows `Rule.h`, which is converted in #130369. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
Algunenano
left a comment
There was a problem hiding this comment.
Maybe it'd make sense to introduce some declarations?
VectorWithMemoryTracking<QueryPlanPtr> -> QueryPlanPtrs or similar
VectorWithMemoryTracking<std::string_view> Parts (for local parts, remote parts, etc).
Addresses review #129617 (review) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…Descriptors` Master added callers of `buildRuntimeRangePredicate` passing `std::vector`, which broke the build of the merge ref: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=129617&sha=latest&name_0=PR #129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…y_plan Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…s` to match `column_stats` after #129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…:removeNodes` after ClickHouse#129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…tFilterPretty` to match the maps changed in ClickHouse#129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…ter` after ClickHouse#129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…ansform` after ClickHouse#129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…::removeUnusedActions` after ClickHouse#129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…e#129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…p`, like the other edge vectors after #129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…ashTableCacheKeys` after #129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
… APIs changed in ClickHouse#129617 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
…imizations` The changes that are local to these files; the rest of `QueryPlan` is in ClickHouse#129617. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DFFRj3kqWUsA1C3A8DapeT
The style check requires the `-WithMemoryTracking` containers in `src/Processors/QueryPlan` since ClickHouse#129617. PR: ClickHouse#131216 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the conflict in src/Interpreters/ExpressionJIT.cpp: the new ActionsDAG::getCompiledConjuncts sits right above compileFunctions, whose parameter type differs on 26.10 (std::unordered_set; master switched it to UnorderedSetWithMemoryTracking in #129617, which is not on 26.10). Keep the 26.10 signature and add only the lines of #131211. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/129617]
Version info
26.11.1.2249-master(included in26.11and later)