yiguolei commented on code in PR #51623:
URL: https://github.com/apache/doris/pull/51623#discussion_r2232824392
##########
be/src/olap/rowset/beta_rowset.cpp:
##########
@@ -839,26 +837,25 @@ Status
BetaRowset::show_nested_index_file(rapidjson::Value* rowset_value,
} else {
rapidjson::Value indices(rapidjson::kArrayType);
for (auto column : _rowset_meta->tablet_schema()->columns()) {
- const auto* index_meta =
_rowset_meta->tablet_schema()->inverted_index(*column);
- if (index_meta == nullptr) {
- continue;
- }
- rapidjson::Value index(rapidjson::kObjectType);
- auto index_id = index_meta->index_id();
- auto index_suffix = index_meta->get_index_suffix();
- index.AddMember("index_id", rapidjson::Value(index_id).Move(),
allocator);
- index.AddMember("index_suffix",
rapidjson::Value(index_suffix.c_str(), allocator),
- allocator);
- auto path =
InvertedIndexDescriptor::get_index_file_path_v1(index_file_path_prefix,
-
index_id, index_suffix);
- auto st = add_file_info_to_json(path, index);
- if (!st.ok()) {
- return st;
- }
+ auto index_metes =
_rowset_meta->tablet_schema()->inverted_indexs(*column);
Review Comment:
typo error?
##########
be/src/olap/rowset/beta_rowset.cpp:
##########
@@ -839,26 +837,25 @@ Status
BetaRowset::show_nested_index_file(rapidjson::Value* rowset_value,
} else {
rapidjson::Value indices(rapidjson::kArrayType);
for (auto column : _rowset_meta->tablet_schema()->columns()) {
- const auto* index_meta =
_rowset_meta->tablet_schema()->inverted_index(*column);
- if (index_meta == nullptr) {
- continue;
- }
- rapidjson::Value index(rapidjson::kObjectType);
- auto index_id = index_meta->index_id();
- auto index_suffix = index_meta->get_index_suffix();
- index.AddMember("index_id", rapidjson::Value(index_id).Move(),
allocator);
- index.AddMember("index_suffix",
rapidjson::Value(index_suffix.c_str(), allocator),
- allocator);
- auto path =
InvertedIndexDescriptor::get_index_file_path_v1(index_file_path_prefix,
-
index_id, index_suffix);
- auto st = add_file_info_to_json(path, index);
- if (!st.ok()) {
- return st;
- }
+ auto index_metes =
_rowset_meta->tablet_schema()->inverted_indexs(*column);
+ for (const auto& index_meta : index_metes) {
+ rapidjson::Value index(rapidjson::kObjectType);
+ auto index_id = index_meta->index_id();
+ auto index_suffix = index_meta->get_index_suffix();
+ index.AddMember("index_id",
rapidjson::Value(index_id).Move(), allocator);
+ index.AddMember("index_suffix",
+ rapidjson::Value(index_suffix.c_str(),
allocator), allocator);
+ auto path =
InvertedIndexDescriptor::get_index_file_path_v1(
+ index_file_path_prefix, index_id, index_suffix);
+ auto st = add_file_info_to_json(path, index);
+ if (!st.ok()) {
+ return st;
+ }
- auto status = process_files(*index_meta, indices, index);
- if (!status.ok()) {
- return status;
+ auto status = process_files(*index_meta, indices, index);
Review Comment:
return if error
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]