BiteTheDDDDt commented on code in PR #64165:
URL: https://github.com/apache/doris/pull/64165#discussion_r3366749339


##########
be/src/exec/operator/scan_operator.cpp:
##########
@@ -82,6 +83,14 @@ Status 
ScanLocalStateBase::update_late_arrival_runtime_filter(RuntimeState* stat
             return a->execute_cost() < b->execute_cost();
         });
     };
+    if (_scan_filter_profile != nullptr) {
+        for (size_t i = conjuncts_before; i < _conjuncts.size(); ++i) {
+            if (_conjuncts[i]->root() != nullptr && 
!_conjuncts[i]->scan_filter_handle()) {
+                _conjuncts[i]->attach_scan_filter(
+                        _register_scan_filter(_conjuncts[i]->root(), nullptr));
+            }

Review Comment:
   Fixed in the latest force-push.
   
   The late-arrival runtime-filter scan-filter handle is now attached 
immediately after `try_append_late_arrival_runtime_filter()` appends new 
contexts, before the full `_conjuncts` vector can be reordered by 
`enable_adjust_conjunct_order_by_cost()`. This keeps the handle attached to the 
newly appended RF regardless of where cost-based sorting moves it, so cloned 
scanner conjuncts can record the residual scan-filter stage rows instead of 
showing the RF as `NotApplied`.
   
   Validation:
   - `./build.sh --be`
   - `git diff --cached --check`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to