compasses commented on code in PR #10355:
URL: https://github.com/apache/doris/pull/10355#discussion_r904986902


##########
be/src/vec/exec/volap_scan_node.cpp:
##########
@@ -772,17 +838,22 @@ Status VOlapScanNode::start_scan(RuntimeState* state) {
     }
 
     VLOG_CRITICAL << "BuildOlapFilters";
-    // 3. Using ColumnValueRange to Build StorageEngine filters
+    // 3.1 Using ColumnValueRange to Build StorageEngine filters
     RETURN_IF_ERROR(build_olap_filters());
+    // 3.2 Function pushdown
+    if (config::enable_function_pushdown)
+        RETURN_IF_ERROR(build_function_filters());
 
     VLOG_CRITICAL << "BuildScanKey";
     // 4. Using `Key Column`'s ColumnValueRange to split ScanRange to several 
`Sub ScanRange`
     RETURN_IF_ERROR(build_scan_key());
 
     VLOG_CRITICAL << "Filter idle conjuncts";
-    // 5. Filter idle conjunct which already trans to olap filters
+    // 5.1 Filter idle conjunct which already trans to olap filters
     // this must be after build_scan_key, it will free the StringValue memory
     remove_pushed_conjuncts(state);
+    // 5.2 move the pushed function context
+    move_pushed_func_conjuncts(state);

Review Comment:
   cannot reuse the ```remove_pushed_conjuncts``` here, because we just 
pushdown the function execution into storage, but the function context and some 
memory referenced by the pushed function still hold in the 
```_pushed_func_conjunct_ctxs``` and will be closed with scan node close.



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to