You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/01/14 22:44:35 UTC

[GitHub] [incubator-doris] GoGoWen commented on a change in pull request #7766: fix NPE in SysVariableDesc::equal

GoGoWen commented on a change in pull request #7766:
URL: https://github.com/apache/incubator-doris/pull/7766#discussion_r785213106



##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/SysVariableDesc.java
##########
@@ -189,6 +189,15 @@ public boolean equals(Object obj) {
         if (!setType.equals(((SysVariableDesc) obj).getSetType())) {
             return false;
         }
-        return literalExpr.equals(((SysVariableDesc) obj).getLiteralExpr());
+
+        if (literalExpr != null) {
+            return literalExpr.equals(((SysVariableDesc) obj).getLiteralExpr());
+        } else {
+            if (((SysVariableDesc) obj).getLiteralExpr() == null) {
+                return true;
+            } else {
+                return false;
+            }
+        }

Review comment:
       nice, done




-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org