[fix] fix NPE in SysVariableDesc::equal (#7766)
This commit is contained in:
@ -32,6 +32,8 @@ import org.apache.doris.thrift.TStringLiteral;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
// System variable
|
||||
// Converted to StringLiteral in analyze, if this variable is not exist, throw AnalysisException.
|
||||
public class SysVariableDesc extends Expr {
|
||||
@ -189,6 +191,7 @@ public class SysVariableDesc extends Expr {
|
||||
if (!setType.equals(((SysVariableDesc) obj).getSetType())) {
|
||||
return false;
|
||||
}
|
||||
return literalExpr.equals(((SysVariableDesc) obj).getLiteralExpr());
|
||||
|
||||
return Objects.equals(literalExpr, ((SysVariableDesc) obj).getLiteralExpr());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user