Yida Wu 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: (2 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@648 PS13, Line 648: return CloneValue(all.GetArray()[0], alloc); Since the "all" is allocated by the same alloc, it seems we can simply move. " return Value(move(all.GetArray()[0])); " http://gerrit.cloudera.org:8080/#/c/24283/13/be/src/service/query-profile-parsing-tools.cc@650 PS13, Line 650: for (const auto& row : all.GetArray()) { : if (!row.IsObject() || !row.HasMember("instance") : || !row["instance"].IsString()) { : continue; : } : const Value& instance_value = row["instance"]; : const string_view instance( : instance_value.GetString(), instance_value.GetStringLength()); : if (instance.find(instance_id) != string::npos) return CloneValue(row, alloc); : } I think the "CloneValue(row, alloc)" can be "Value(move(row))" if we change to "for (auto& row : all.GetArray())" -- 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:55:22 +0000 Gerrit-HasComments: Yes
