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

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


Patch Set 10:

(4 comments)

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

http://gerrit.cloudera.org:8080/#/c/24282/10/be/src/service/query-profile-redaction.cc@98
PS10, Line 98: // Merges original-to-alias mappings into an alias-to-original 
lookup table.
             : static unordered_map<string_view, string_view> 
BuildAliasReverseMap(
A bit concern of returning the string_view, maybe we can add a comment like 
this to warn:
"// Returns string_views that may tie to the memory of strings in 
'original_to_alias'.
// To prevent dangling pointers, callers must use these views only when 
'original_to_alias' exists."


http://gerrit.cloudera.org:8080/#/c/24282/10/be/src/service/query-profile-redaction.cc@286
PS10, Line 286: auto
Can we use explicit type unordered_map<string_view, string_view>, so that 
visually obvious to anyone who might use this later


http://gerrit.cloudera.org:8080/#/c/24282/10/be/src/service/query-profile-redaction.cc@527
PS10, Line 527:
Can we also add a logging here, something like below for debug purpose?
"
VLOG(1) << "Query profile redaction complete. Extracted items : "
          << "SQL statements: " << sql_statements.size() << ", "
          << "Users: " << username_tokens.size() << ", "
          << "IPs: " << all_ip_tokens.size() << ", "
          << "Tables: " << table_tokens.size() << ", "
          << "Columns: " << column_tokens.size() << ", "
          << "Hosts: " << host_tokens.size() << ". "
          << "Total aliases generated: " << alias_to_original.size();
"


http://gerrit.cloudera.org:8080/#/c/24282/10/be/src/service/query-profile-redaction.cc@550
PS10, Line 550:     return Status("Query profile input must be a valid JSON 
object");
Can we add a logging here to print the error info?
"LOG(ERROR) << "Profile redaction failed with the RapidJSON error code: "
               << source_json.GetParseError() << " at offset: "
               << source_json.GetErrorOffset();"



--
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: 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: Fri, 15 May 2026 21:58:30 +0000
Gerrit-HasComments: Yes

Reply via email to