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 12:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/24283/12/be/src/service/query-profile-parsing-tools.cc
File be/src/service/query-profile-parsing-tools.cc:

http://gerrit.cloudera.org:8080/#/c/24283/12/be/src/service/query-profile-parsing-tools.cc@906
PS12, Line 906:   transform(normalized_pattern.begin(), 
normalized_pattern.end(),
              :       normalized_pattern.begin(), ::toupper);
From the reference in https://en.cppreference.com/cpp/string/byte/toupper.
I think we should use the following as best practice to avoid Undefined 
Behavior with signed chars:
"
transform(normalized_pattern.begin(), normalized_pattern.end(),
    normalized_pattern.begin(), [](unsigned char c) { return toupper(c); });
"


http://gerrit.cloudera.org:8080/#/c/24283/12/be/src/service/query-profile-parsing-tools.cc@924
PS12, Line 924:     transform(upper_key.begin(), upper_key.end(), 
upper_key.begin(), ::toupper);
>From the reference in https://en.cppreference.com/cpp/string/byte/toupper.
Similar to above for the best practice:
"
transform(upper_key.begin(), upper_key.end(),
    upper_key.begin(), [](unsigned char c) { return toupper(c); });
"



--
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: 12
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 23:27:06 +0000
Gerrit-HasComments: Yes

Reply via email to