sduzh commented on a change in pull request #4310:
URL: https://github.com/apache/incubator-doris/pull/4310#discussion_r467791212
##########
File path: be/src/olap/schema.h
##########
@@ -53,19 +53,21 @@ class Schema {
}
columns.push_back(column);
}
-
+ _delete_sign_idx = tablet_schema.delete_sign_idx();
_init(columns, col_ids, num_key_columns);
}
// All the columns of one table may exist in the columns param, but
col_ids is only a subset.
Schema(const std::vector<TabletColumn>& columns, const
std::vector<ColumnId>& col_ids) {
size_t num_key_columns = 0;
- for (const auto& c: columns) {
- if (c.is_key()) {
+ for (size_t i = 0; i < columns.size(); ++i) {
+ if (columns.at(i).is_key()) {
Review comment:
`std::vector::at` has extra runtime overhead, compared with `operator[]`.
----------------------------------------------------------------
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]