Daniel Becker has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/20447 )

Change subject: IMPALA-13039: AES Encryption/ Decryption Support in Impala
......................................................................


Patch Set 36:

(2 comments)

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

http://gerrit.cloudera.org:8080/#/c/20447/36/be/src/exprs/string-functions.cc@441
PS36, Line 441: StringPiece
              :         (reinterpret_cast<const char*>(mode.ptr), mode.len))
> nit: There is a utility function to create an std::string from StringVal: h
We intentionally didn't want to create a string to avoid copying.


http://gerrit.cloudera.org:8080/#/c/20447/36/be/src/util/openssl-util-test.cc
File be/src/util/openssl-util-test.cc:

http://gerrit.cloudera.org:8080/#/c/20447/36/be/src/util/openssl-util-test.cc@81
PS36, Line 81:       if (m == AES_CIPHER_MODE::AES_256_GCM || m == 
AES_CIPHER_MODE::AES_256_CTR ||
             :           m == AES_CIPHER_MODE::AES_256_CFB || m == 
AES_CIPHER_MODE::AES_256_EC
> nit: The same logic is used in line 129 - there could be some function that
If we touch that part:
- We could take the switch statement out of ValidateModeAndKeyLength() into 
another function which returns the correct key length for the mode
- ValidateModeAndKeyLength() could call this function for validateion
- in InitializeRandom(), we don't even need to take the key length as a 
parameter because it follows from the mode. We could use the new function.
- in InitializeFields, I would keep the key_len parameter because there we pass 
in a buffer.

After these changes, the code lines referenced here will become a single line, 
no branching needed here in the test.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3902f2b1d95da4d06995cbd687e79c48e16190c9
Gerrit-Change-Number: 20447
Gerrit-PatchSet: 36
Gerrit-Owner: Pranav Lodha <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Daniel Becker <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Noemi Pap-Takacs <[email protected]>
Gerrit-Reviewer: Pranav Lodha <[email protected]>
Gerrit-Comment-Date: Mon, 27 Jan 2025 12:56:39 +0000
Gerrit-HasComments: Yes

Reply via email to