Jim Apple has posted comments on this change. Change subject: IMPALA-2878: Remove unused function and duplicate codes. ......................................................................
Patch Set 2: (3 comments) http://gerrit.cloudera.org:8080/#/c/3311/2/be/src/exprs/string-functions-ir.cc File be/src/exprs/string-functions-ir.cc: Line 808: std::function<char* (unsigned)> allocator = [&](unsigned size)->char* { This feels a little heavyweight. What about breaking impala::Base64Encode up into two functions - one (maybe Base64EncodeLength) that describes the length of the output string. Then this function can do the allocation directly, without lambdas. http://gerrit.cloudera.org:8080/#/c/3311/2/be/src/util/url-coding-test.cc File be/src/util/url-coding-test.cc: Line 55 It's OK to have a base64decode function that is only used in testing. http://gerrit.cloudera.org:8080/#/c/3311/2/be/src/util/url-coding.h File be/src/util/url-coding.h: Line 41: enum class Base64EncodeStatus { ENCODE_OK, INVALID_LEN, ENCODE_FAIL }; Please add a note here explaining what ENCODE_FAIL means - is it all other failure modes other than INVALID_LEN? What are those failure modes? -- To view, visit http://gerrit.cloudera.org:8080/3311 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ica8f61fce7af16aa859f71d0763303e8d832ddcd Gerrit-PatchSet: 2 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Yuanhao Luo <[email protected]> Gerrit-Reviewer: Jim Apple <[email protected]> Gerrit-Reviewer: Yuanhao Luo <[email protected]> Gerrit-HasComments: Yes
