Tanya-W commented on code in PR #13035:
URL: https://github.com/apache/doris/pull/13035#discussion_r1057422940


##########
be/src/vec/exprs/vectorized_fn_call.cpp:
##########
@@ -104,12 +104,36 @@ doris::Status VectorizedFnCall::execute(VExprContext* 
context, doris::vectorized
     size_t num_columns_without_result = block->columns();
     // prepare a column to save result
     block->insert({nullptr, _data_type, _expr_name});
+    if (_function->can_fast_execute()) {
+        bool ok = fast_execute(context->fn_context(_fn_context_index), *block, 
arguments,
+                                       num_columns_without_result, 
block->rows());
+        if (ok) {
+            *result_column_id = num_columns_without_result;
+            return Status::OK();
+        }
+    }
+
     RETURN_IF_ERROR(_function->execute(context->fn_context(_fn_context_index), 
*block, arguments,
                                        num_columns_without_result, 
block->rows(), false));
     *result_column_id = num_columns_without_result;
     return Status::OK();
 }
 
+bool VectorizedFnCall::fast_execute(FunctionContext* context, Block& block, 
const ColumnNumbers& arguments,

Review Comment:
   function `fast_execute ` can be better distinguished from 
`_function->execute`, the difference between `fast_execute` and 
`_function->execute` is `fast_execute` can direct copy expr filter result which 
build by apply index in segment_iterator, `_function->execute` need do some 
complex filtering logic.



-- 
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