Jason Fehr 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 13: (15 comments) http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc File be/src/service/query-profile-parsing-tools.cc: http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@116 PS13, Line 116: static int64_t ComputeDefaultProfileSizeLimitBytes() { This function duplicates ComputeDefaultProfileSizeLimitBytes in query-profile-redaction.cc http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@366 PS13, Line 366: sort(fragments_.begin(), fragments_.end(), : [](const auto& lhs, const auto& rhs) { return lhs.first < rhs.first; }); Use a std::set or std::multiset as the type for fragments_ to avoid a separate sort. http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@455 PS13, Line 455: if (fragment.second == nullptr) continue; Swap the order of lines 454 and 455. No need to declare the key string_view if fragment.second == nullptr. http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@481 PS13, Line 481: >= 5 is the highest value returned by FragmentMatchRank. Should this be == instead of >=? http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@486 PS13, Line 486: sort(matches.begin(), matches.end(), : [](const auto* lhs, const auto* rhs) { return lhs->first < rhs->first; }); Why is this sort needed? Can a std::set or std::multiset be used instead of a vector for the matches variable? http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@515 PS13, Line 515: if (fragment.second == nullptr) continue; Swap the order of lines 514 and 515. No need to declare the key string_view if fragment.second == nullptr. http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@527 PS13, Line 527: >= 5 is the highest value returned by FragmentMatchRank. Should this be == instead of >=? http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@554 PS13, Line 554: string_view matched_key; No need to declate matched_key, either set a default value of nullptr for matched_key in the SearchOperator function declaration (in query-profile-parsing-tools.h) or else pass nullptr as the last parameter in this call to SearchOperator() http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@670 PS13, Line 670: struct StringViewPairHash { : size_t operator()(const pair<string_view, string_view>& value) const { : return hash<string_view>()(value.first) : ^ (hash<string_view>()(value.second) << 1); : } : }; Declare this struct in query-profile-parsing-tools.h under the private section of the QueryProfileToolAccessor class definition. http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@1314 PS13, Line 1314: if (args.HasMember("node_id") && args["node_id"].IsString()) { There should be an else clause on this if statement to let the LLM know it provided an incorrect/missing node_id argument. http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@1324 PS13, Line 1324: if (args.HasMember("node_id") && args["node_id"].IsString()) { There should be an else clause on this if statement to let the LLM know it provided an incorrect/missing node_id argument. http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@1328 PS13, Line 1328: if (args.HasMember("fragment_id") && args["fragment_id"].IsString()) { There should be an else clause on this if statement to let the LLM know it provided an incorrect/missing fragment_id argument. http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@1339 PS13, Line 1339: if (args.HasMember("node_id") && args["node_id"].IsString()) { There should be an else clause on this if statement to let the LLM know it provided an incorrect/missing node_id argument. http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@1343 PS13, Line 1343: if (args.HasMember("fragment_id") && args["fragment_id"].IsString()) { There should be an else clause on this if statement to let the LLM know it provided an incorrect/missing fragment_id argument. http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@1347 PS13, Line 1347: if (args.HasMember("instance_id") && args["instance_id"].IsString()) { There should be an else clause on this if statement to let the LLM know it provided an incorrect/missing instance_id argument. -- 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: 13 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: Tue, 19 May 2026 02:59:58 +0000 Gerrit-HasComments: Yes
