You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2023/01/17 15:37:26 UTC

[GitHub] [doris] github-actions[bot] commented on a diff in pull request #16034: [enhancement](load) avoid schema copy to reduce cpu usage

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


##########
be/src/olap/delta_writer.cpp:
##########
@@ -425,21 +426,20 @@ int64_t DeltaWriter::partition_id() const {
 }
 
 void DeltaWriter::_build_current_tablet_schema(int64_t index_id,
-                                               const POlapTableSchemaParam& ptable_schema_param,
+                                               const OlapTableSchemaParam* table_schema_param,
                                                const TabletSchema& ori_tablet_schema) {
     _tablet_schema->copy_from(ori_tablet_schema);
-
     // find the right index id
     int i = 0;
-    for (; i < ptable_schema_param.indexes_size(); i++) {
-        if (ptable_schema_param.indexes(i).id() == index_id) break;
+    for (; i < table_schema_param->indexes().size(); i++) {
+        if (table_schema_param->indexes()[i]->index_id == index_id) break;

Review Comment:
   warning: statement should be inside braces [readability-braces-around-statements]
   
   ```suggestion
           if (table_schema_param->indexes()[i]->index_id == index_id) { break;
   }
   ```
   



##########
be/src/olap/tablet_schema.h:
##########
@@ -215,7 +216,7 @@ class TabletSchema {
     vectorized::Block create_block(bool ignore_dropped_col = true) const;
 
     void build_current_tablet_schema(int64_t index_id, int32_t version,
-                                     const POlapTableIndexSchema& index,
+                                     const OlapTableIndexSchema* index,

Review Comment:
   warning: unknown type name 'OlapTableIndexSchema' [clang-diagnostic-error]
   ```cpp
                                        const OlapTableIndexSchema* index,
                                              ^
   ```
   



-- 
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-unsubscribe@doris.apache.org

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


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