Jim Apple has posted comments on this change.

Change subject: IMPALA-2107: Add Base64 encoder/decoder
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/2633/1/be/src/exprs/string-functions.cc
File be/src/exprs/string-functions.cc:

Line 803:   uint8_t* const out = ctx->Allocate(outmax);
It would be possible to do this without two allocation/deallocation pairs and 
without the copy by making the StringVal result's .len be one less than it was 
allocated with. That is, create the result with length L+1, fill it using 
sasl_encode64, then adjust .len (which is public) by subtracting 1. I think the 
FunctionContext would still clean up the memory properly, but it's a little too 
sneaky for my taste.

We could also have our own base64 encoder, but that seems like an unnecessary 
amount of code duplication.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I911451c5d68e8ae9d352abfcf4d5ff36484f0bf3
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-trunk
Gerrit-Owner: Jim Apple <[email protected]>
Gerrit-Reviewer: Jim Apple <[email protected]>
Gerrit-HasComments: Yes

Reply via email to