[nereids](function)fix encryption function translation bug#15038
[nereids](function)fix encryption function translation bug#15038morrySnow merged 2 commits intoapache:masterfrom
Conversation
|
TeamCity pipeline, clickbench performance test result: |
a700263 to
9d70dce
Compare
| String blockEncryptionMode = context.getRuntimeTranslator().get().getRuntimeFilterContext() | ||
| .getSessionVariable().getBlockEncryptionMode(); |
There was a problem hiding this comment.
if u want session variables, u has two way to do that:
- ConnectContext.get(). getSessionVariable()
- put cascadesContext into PlanTranslatorContext
| .getSessionVariable().getBlockEncryptionMode(); | ||
| if (function.getName().equalsIgnoreCase("aes_decrypt") | ||
| || function.getName().equalsIgnoreCase("aes_encrypt")) { | ||
| HashSet<String> aesModes = new HashSet<>(Arrays.asList( |
There was a problem hiding this comment.
we should put this set to an util class and make it static
| } else if (function.getName().equalsIgnoreCase("sm4_decrypt") | ||
| || function.getName().equalsIgnoreCase("sm4_encrypt")) { |
There was a problem hiding this comment.
maybe we need a new interface for all en/decrypt functions, the interface has two use:
- we can use xxx instanceOf xxx, instead of use function name to judge function type
- afford some helper function, such as
a. isAes()
b. isSm4()
|
I think we should create new function like |
9d70dce to
ea7681c
Compare
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
Proposed changes
Issue Number: close #xxx
Problem summary
Describe your changes.
Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...