github-actions[bot] commented on code in PR #15665:
URL: https://github.com/apache/doris/pull/15665#discussion_r1062932114


##########
be/src/olap/types.cpp:
##########
@@ -166,10 +166,34 @@ const TypeInfo* get_array_type_info(FieldType leaf_type, 
int32_t iterations) {
     return array_type_Info_arr[leaf_type][iterations];
 }
 
+// Produce a struct type info
+// TODO(xy): Need refactor to this produce method
+const TypeInfo* get_struct_type_info(std::vector<FieldType> field_types) {
+    std::vector<TypeInfoPtr> type_infos;
+    type_infos.reserve(field_types.size());
+    for(FieldType& type : field_types) {
+        if (is_scalar_type(type)) {
+            type_infos.push_back(
+                    
std::move(create_static_type_info_ptr(get_scalar_type_info(type))));

Review Comment:
   warning: moving a temporary object prevents copy elision 
[clang-diagnostic-pessimizing-move]
   ```cpp
                       
std::move(create_static_type_info_ptr(get_scalar_type_info(type))));
                       ^
   ```
   **be/src/olap/types.cpp:176:** remove std::move call here
   ```cpp
                       
std::move(create_static_type_info_ptr(get_scalar_type_info(type))));
                       ^
   ```
   



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