acelyc111 commented on a change in pull request #3750: URL: https://github.com/apache/incubator-doris/pull/3750#discussion_r435397028
########## File path: be/src/olap/tablet_schema.h ########## @@ -107,22 +113,30 @@ class TabletSchema { inline void set_is_in_memory (bool is_in_memory) { _is_in_memory = is_in_memory; } + private: - KeysType _keys_type; + friend bool operator==(const TabletSchema& a, const TabletSchema& b); + friend bool operator!=(const TabletSchema& a, const TabletSchema& b); + +private: + KeysType _keys_type = DUP_KEYS; std::vector<TabletColumn> _cols; - size_t _num_columns; - size_t _num_key_columns; - size_t _num_null_columns; - size_t _num_short_key_columns; - size_t _num_rows_per_row_block; - CompressKind _compress_kind; - size_t _next_column_unique_id; + size_t _num_columns = 0; + size_t _num_key_columns = 0; + size_t _num_null_columns = 0; + size_t _num_short_key_columns = 0; + size_t _num_rows_per_row_block = 0; + CompressKind _compress_kind = COMPRESS_NONE; + size_t _next_column_unique_id = 0; bool _has_bf_fpp = false; double _bf_fpp = 0; bool _is_in_memory = false; }; +bool operator==(const TabletSchema& a, const TabletSchema& b); Review comment: TabletMeta has a TabletSchema member, overload TabletSchema's == operator is aim to overload TabletMeta's == operator. Now TabletMeta's == operator is used for convenient unit test. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org