HappenLee commented on code in PR #64563:
URL: https://github.com/apache/doris/pull/64563#discussion_r3481396781


##########
be/src/exprs/lambda_function/varray_map_function.cpp:
##########
@@ -179,15 +165,72 @@ class ArrayMapFunction : public LambdaFunction {
                 }
             }
             lambda_datas[i] = col_array.get_data_ptr();
-            names.push_back("R" + array_column_type_name.name);
-            data_types.push_back(col_type.get_nested_type());
+            const auto& col_type = assert_cast<const 
DataTypeArray&>(*type_array);
+            lambda_argument_types[i] = col_type.get_nested_type();
+        }
+        std::set<int> required_input_column_ids;
+        children[0]->collect_slot_column_ids(required_input_column_ids);
+        
context->lambda_execution_context().collect_visible_binding_column_positions(
+                required_input_column_ids);
+        const int lambda_argument_base =
+                required_input_column_ids.empty() ? 0 : 
*required_input_column_ids.rbegin() + 1;
+        if (!_lambda_argument_binding.bind_by_name) {
+            RETURN_IF_ERROR(
+                    _set_legacy_lambda_argument_gap(children[0]->get_child(0), 
lambda_argument_base,
+                                                    
_lambda_argument_binding.argument_size));
+        }
+        std::vector<std::string> names(lambda_argument_base);
+        DataTypes data_types(lambda_argument_base);
+        std::vector<bool> materialized_input_columns(lambda_argument_base, 
false);
+        names.reserve(lambda_argument_base + arguments.size());
+        data_types.reserve(lambda_argument_base + arguments.size());
+        for (int column_id : required_input_column_ids) {
+            if (column_id < 0 || block == nullptr ||

Review Comment:
   这种随意判空的逻辑都去掉哈



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