kangpinghuang commented on a change in pull request #452: Add AlphaRowsetMeta 
and AlphaRowsetReader
URL: https://github.com/apache/incubator-doris/pull/452#discussion_r243790476
 
 

 ##########
 File path: be/src/olap/segment_group.cpp
 ##########
 @@ -115,15 +125,14 @@ SegmentGroup::SegmentGroup(Tablet* tablet, bool 
delete_flag,
     _new_segment_created = false;
     _empty = false;
 
-    const RowFields& tablet_schema = _tablet->tablet_schema();
-    for (size_t i = 0; i < _tablet->num_short_key_fields(); ++i) {
-        _short_key_info_list.push_back(tablet_schema[i]);
-        _short_key_length += tablet_schema[i].index_length + 1;// 1 for null 
byte
-        if (tablet_schema[i].type == OLAP_FIELD_TYPE_CHAR ||
-            tablet_schema[i].type == OLAP_FIELD_TYPE_VARCHAR) {
+    for (size_t i = 0; i < _num_key_fields; ++i) {
+        _short_key_info_list.push_back(_tablet_schema[i]);
+        _short_key_length += _tablet_schema[i].index_length + 1;// 1 for null 
byte
+        if (_tablet_schema[i].type == OLAP_FIELD_TYPE_CHAR ||
+            _tablet_schema[i].type == OLAP_FIELD_TYPE_VARCHAR) {
             _new_short_key_length += sizeof(Slice) + 1;
         } else {
-            _new_short_key_length += tablet_schema[i].index_length + 1;
 
 Review comment:
   ok

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to