xiaokang commented on code in PR #35302:
URL: https://github.com/apache/doris/pull/35302#discussion_r1615076678


##########
be/src/vec/exprs/vin_predicate.cpp:
##########
@@ -100,12 +103,52 @@ Status VInPredicate::execute(VExprContext* context, 
Block* block, int* result_co
     size_t num_columns_without_result = block->columns();
     // prepare a column to save result
     block->insert({nullptr, _data_type, _expr_name});
+
+    if (_can_fast_execute) {
+        auto can_fast_execute = 
fast_execute(context->fn_context(_fn_context_index), *block,
+                                             arguments, 
num_columns_without_result, block->rows());
+        if (can_fast_execute) {
+            *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 VInPredicate::fast_execute(FunctionContext* context, Block& block,
+                                const ColumnNumbers& arguments, size_t result,
+                                size_t input_rows_count) {
+    std::string column_name = block.get_by_position(arguments[0]).name;
+    std::string result_column_name = BeConsts::BLOCK_TEMP_COLUMN_PREFIX + 
column_name + "_in_list_";

Review Comment:
   use a common function generate the column name consistently



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