Gokul Kolady has posted comments on this change. ( http://gerrit.cloudera.org:8080/24283 )
Change subject: IMPALA-14962: Query Profile Parser and Section Retrieval Interface ...................................................................... Patch Set 10: (8 comments) http://gerrit.cloudera.org:8080/#/c/24283/9/be/src/service/query-profile-parsing-tools.cc File be/src/service/query-profile-parsing-tools.cc: http://gerrit.cloudera.org:8080/#/c/24283/9/be/src/service/query-profile-parsing-tools.cc@242 PS9, Line 242: source_json.Parse( > RapidJSON is forced to run strlen() under the hood to figure out how long i Done http://gerrit.cloudera.org:8080/#/c/24283/9/be/src/service/query-profile-parsing-tools.cc@303 PS9, Line 303: vector<pair<string, const Value*>> all_fragments; : GatherFragments(*scoped_exec, &all_fragments); : for (const auto& item : all_fragments) { : const string& key = item.first; : const int count = ++used[key]; : string unique_key = key; : if (count > 1) { : unique_key.append(" [").append(std::to_string(count)).append("]"); : } : fragments_.emplace_back(move(unique_key), item.second); : } > It seems that we only use GatherItems to collect fragment nodes only, how a Done http://gerrit.cloudera.org:8080/#/c/24283/9/be/src/service/query-profile-parsing-tools.cc@839 PS9, Line 839: if (IsFragmentKey(key)) out->emplac > If changing to GatherFragments, we can change here: Done http://gerrit.cloudera.org:8080/#/c/24283/9/be/src/service/query-profile-parsing-tools.cc@871 PS9, Line 871: if (numeric_node_id) return 0; > Do we really need to limit the "node_id.size() <= 2", it seems fine to do " Done http://gerrit.cloudera.org:8080/#/c/24283/9/be/src/service/query-profile-parsing-tools.cc@1088 PS9, Line 1088: args["node_id"].GetString(), args["node_id"].GetStringLength()); : } : if (args.HasMember("fragment_id") && args["fragment_id"].IsString()) { : fragment_id = string_view( : arg > It seems better to return Status to handle errors, and otherwise the caller Done http://gerrit.cloudera.org:8080/#/c/24283/9/be/src/service/query-profile-parsing-tools.cc@1127 PS9, Line 1127: Status CreateQueryProfileToolExecutorForProfile( > SetObject() is unnecessary if !tool_args_json.empty() returns true. Maybe Done http://gerrit.cloudera.org:8080/#/c/24283/9/be/src/service/query-profile-parsing-tools.cc@1137 PS9, Line 1137: if (profile_text.size() > static_cast<size_t>(effective_profile_size_limit_bytes)) { > SetObject() call seems unnecessary here. Done http://gerrit.cloudera.org:8080/#/c/24283/9/be/src/service/query-profile-parsing-tools.cc@1138 PS9, Line 1138: LOG(WARNING) << "Query profile parsing failed because input size " > If we change ExecuteTool to return Status, we can change here: Done -- To view, visit http://gerrit.cloudera.org:8080/24283 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I4d9c9e735aa089bb243b07af421553002a465a88 Gerrit-Change-Number: 24283 Gerrit-PatchSet: 10 Gerrit-Owner: Gokul Kolady <[email protected]> Gerrit-Reviewer: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Gokul Kolady <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Yida Wu <[email protected]> Gerrit-Comment-Date: Mon, 18 May 2026 18:19:10 +0000 Gerrit-HasComments: Yes
