imay commented on a change in pull request #311: Transform row-oriented table
to columnar-oriented table
URL: https://github.com/apache/incubator-doris/pull/311#discussion_r234081463
##########
File path: be/src/olap/olap_header_manager.cpp
##########
@@ -126,19 +126,7 @@ OLAPStatus
OlapHeaderManager::set_converted_flag(OlapStore* store) {
}
OLAPStatus OlapHeaderManager::traverse_headers(OlapMeta* meta,
- std::function<bool(long, long, const std::string&)> const& func) {
- auto traverse_header_func = [&func](const std::string& key, const
std::string& value) -> bool {
- std::vector<std::string> parts;
- // key format: "hdr_" + tablet_id + "_" + schema_hash
- split_string<char>(key, '_', &parts);
- if (parts.size() != 3) {
- LOG(WARNING) << "invalid header key:" << key << ", splitted size:"
<< parts.size();
- return true;
- }
- TTabletId tablet_id = std::stol(parts[1].c_str(), NULL, 10);
- TSchemaHash schema_hash = std::stol(parts[2].c_str(), NULL, 10);
- return func(tablet_id, schema_hash, value);
- };
Review comment:
You can't change it, this encapsulate `tablet_id` and `schema_hash` encoding
logic. If you put it logic outside, every one need to implement the same logic
----------------------------------------------------------------
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]