Repository navigation
Conversation
|
Could someone please assign |
|
@Algunenano @murphy-4o @vdimir please assign |
|
@vdimir over a week ago the PR was approved but not merged. Why? Do you have any questions/suggestions about this PR? Let me know and I will implement it. |
|
Could you merge master? |
|
@vdimir I have merged the master as requested. |
|
Workflow [PR], commit [cc974a0] Summary: ❌
AI ReviewSummaryThis PR makes Findings
Final Verdict
|
|
@vdimir please advice what should I do with this PR? I may merge master again. |
|
Dear @vdimir, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
|
@rvasin, try to resolve the remaining review comments: #103705 (comment) |
…uery_condition_cache
… is live before KILL
…dd use_statistics_for_part_pruning=0
|
|
||
| void transform(Chunk & chunk) override; | ||
|
|
||
| void onCancel() noexcept override; |
There was a problem hiding this comment.
This only fixes processors whose executor cancels a real FilterTransform. FilterSortedStreamByRange keeps a separate FilterTransform member and calls filter_transform.transform(chunk) directly at src/Processors/Transforms/FilterSortedStreamByRange.cpp:27 and :41, but the pipeline only ever calls cancel() / onCancel() on the outer FilterSortedStreamByRange. That leaves the inner helper's isCancelled() flag false, so its new check_cancelled callback and cancelExecution forwarding never fire. Queries that go through the range-filter path from src/Processors/QueryPlan/PartsSplitter.cpp:1235 therefore still cannot interrupt a long-running function inside the filter expression.
Please forward cancellation into filter_transform from FilterSortedStreamByRange::onCancel (or otherwise share the cancellation state) before relying on this fix there.
|
|
||
| if (expression) | ||
| expression->execute(block, num_rows_before_filtration); | ||
| expression->execute(block, num_rows_before_filtration, false, false, [this]() { return isCancelled(); }); |
There was a problem hiding this comment.
This closes the WHERE path, but HAVING still evaluates its predicate in TotalsHavingTransform, which calls expression->execute(finalized_block, num_rows) and expression->execute(block, num_rows) at src/Processors/Transforms/TotalsHavingTransform.cpp:196 and :301 without a cancellation callback or any onCancel forwarding. A long-running UDF or deep nested function in HAVING therefore remains uninterruptible by KILL QUERY or clickhouse-client cancellation, so the nested-expression cancellation hole is still open on the sibling filter stage.
Please mirror the FilterTransform changes there too, and make the cancelled execute path return before the totals / filter bookkeeping continues.
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 33/34 (97.06%) · Uncovered code |
|
Thank you for this improvement, @rvasin! The branch had merge conflicts with |
|
@alexey-milovidov I am on vocations this week. I will restart working on Monday 3rd August on other tasks then. As for this task the merge conflicts were due to merging of my another pool request for |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Improve canceling queries in nested expression functions in FilterTransform by KILL QUERY and cancel query (Ctrl+C) in clickhouse-client.