dongjoon-hyun commented on code in PR #36900:
URL: https://github.com/apache/spark/pull/36900#discussion_r900528871


##########
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/ExpressionImplUtils.java:
##########
@@ -62,13 +62,13 @@ private static byte[] aesInternal(
       }
 
     try {
-      if (mode.equalsIgnoreCase("ECB") &&
-          (padding.equalsIgnoreCase("PKCS") || 
padding.equalsIgnoreCase("DEFAULT"))) {
+      if ("ECB".equalsIgnoreCase(mode) &&
+          ("PKCS".equalsIgnoreCase(padding) || 
"DEFAULT".equalsIgnoreCase(padding))) {
         Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
         cipher.init(opmode, secretKey);
         return cipher.doFinal(input, 0, input.length);
-      } else if (mode.equalsIgnoreCase("GCM") &&
-          (padding.equalsIgnoreCase("NONE") || 
padding.equalsIgnoreCase("DEFAULT"))) {
+      } else if ("GCM".equalsIgnoreCase(mode) &&
+          ("NONE".equalsIgnoreCase(padding) || 
"DEFAULT".equalsIgnoreCase(padding))) {

Review Comment:
   Could you revert these changes of this file, @dcoliversun ?
   This is logically impossible because `aesInternal` is `private static` and 
used in the constructor with `mode.toString()`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to