[minor](Nereids): convert if condition into a check (#20855)

This commit is contained in:
jakevin
2023-06-15 20:10:56 +08:00
committed by GitHub
parent 4bfceb7acb
commit 21bb7fea07

View File

@ -366,7 +366,8 @@ public class Memo {
throw new IllegalStateException("Insert a plan into targetGroup but differ in logicalproperties");
}
Optional<GroupExpression> groupExpr = plan.getGroupExpression();
if (groupExpr.isPresent() && groupExpressions.containsKey(groupExpr.get())) {
if (groupExpr.isPresent()) {
Preconditions.checkState(groupExpressions.containsKey(groupExpr.get()));
return CopyInResult.of(false, groupExpr.get());
}
List<Group> childrenGroups = Lists.newArrayList();