Abhishek Rawat has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24282 )

Change subject: IMPALA-14961: Query Profile Redaction
......................................................................


Patch Set 11: Code-Review+1

(6 comments)

http://gerrit.cloudera.org:8080/#/c/24282/11/be/src/service/query-profile-redaction.cc
File be/src/service/query-profile-redaction.cc:

http://gerrit.cloudera.org:8080/#/c/24282/11/be/src/service/query-profile-redaction.cc@289
PS11, Line 289:   const unordered_map<string_view, string_view> reverse_aliases 
=
BuildAliasReverseMap seems unnecessary can can possibly be removed? We could 
simply iterate over aliases and store the key:value as value:key in 
alias_to_original?


http://gerrit.cloudera.org:8080/#/c/24282/11/be/src/service/query-profile-redaction.cc@319
PS11, Line 319: static vector<string> 
CollectIdentifierContextsFromJsonProfile(const Value& node) {
we're returning a vector with every recursion and doing too many 
allocations/deallocations. We could instead pass the vector by reference to the 
recursion tree.


http://gerrit.cloudera.org:8080/#/c/24282/11/be/src/service/query-profile-redaction.cc@358
PS11, Line 358: static vector<string> CollectInfoStringValuesByKeys(
We could pass the vector by reference down the recursion tree.


http://gerrit.cloudera.org:8080/#/c/24282/11/be/src/service/query-profile-redaction.cc@395
PS11, Line 395:   set<string> seen_host_tokens;
We need ordering? If not we could just use a vector<string> here. We could 
assume that the host names are not duplicates in the profile.


http://gerrit.cloudera.org:8080/#/c/24282/11/be/src/service/query-profile-redaction.cc@516
PS11, Line 516:   status = BuildApplyAndTrackAliases(all_ip_tokens, "ip", 
redacted, alias_to_original);
We're calling BuildApplyAndTrackAliases multiple times and essentially scanning 
the profile and copying it multiple times. We could instead build a dictionary 
using all the tokens and apply all the aliases in one pass doing a single copy 
of profile.


http://gerrit.cloudera.org:8080/#/c/24282/11/be/src/service/query-profile-redaction.cc@573
PS11, Line 573:   unordered_map<string, string> alias_to_original;
local map seems unnecessary? You could directly pass `alias_to_original` and 
remove the move operation later.



--
To view, visit http://gerrit.cloudera.org:8080/24282
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: If0c5b4911a64888f319f212155df6e08c1800b32
Gerrit-Change-Number: 24282
Gerrit-PatchSet: 11
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: Sat, 16 May 2026 01:57:16 +0000
Gerrit-HasComments: Yes

Reply via email to