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@1129 PS13, Line 1129: 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/13/be/src/service/query-profile-parsing-tools.cc@1147 PS13, Line 1147: transform(upper_key.begin(), upper_key.end(), upper_key.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(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: 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:26:18 +0000 Gerrit-HasComments: Yes
