acelyc111 commented on a change in pull request #3750:
URL: https://github.com/apache/incubator-doris/pull/3750#discussion_r433912838



##########
File path: be/src/olap/tablet_schema.cpp
##########
@@ -337,14 +337,12 @@ void TabletColumn::to_schema_pb(ColumnPB* column) {
     }
 }
 
-TabletSchema::TabletSchema()
-    : _num_columns(0),
-      _num_key_columns(0),
-      _num_null_columns(0),
-      _num_short_key_columns(0) { }
-
 void TabletSchema::init_from_pb(const TabletSchemaPB& schema) {
     _keys_type = schema.keys_type();
+    _num_columns = 0;
+    _num_key_columns = 0;
+    _num_null_columns = 0;

Review comment:
       @morningman `_num_short_key_columns` will be assigned in line 358 
directly, not like the above variables which will be increased in the following 
loop, so I didn't reset it here.




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

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