Skip to content

Commit

Permalink
fix fe ut test
Browse files Browse the repository at this point in the history
  • Loading branch information
seawinde committed Dec 4, 2023
1 parent a6644ad commit 36fa988
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.apache.doris.nereids.trees.expressions.Expression;
import org.apache.doris.nereids.trees.expressions.Slot;
import org.apache.doris.nereids.trees.expressions.SlotReference;
import org.apache.doris.nereids.trees.expressions.literal.BooleanLiteral;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
Expand Down Expand Up @@ -68,21 +69,21 @@ private void assetEquals(String expression,
Expression equalExpression = replaceUnboundSlot(PARSER.parseExpression(expectedEqualExpr), mem);
Assertions.assertEquals(equalExpression, splitPredicate.getEqualPredicate());
} else {
Assertions.assertNull(splitPredicate.getEqualPredicate());
Assertions.assertEquals(splitPredicate.getEqualPredicate(), BooleanLiteral.TRUE);
}

if (!StringUtils.isEmpty(expectedRangeExpr)) {
Expression rangeExpression = replaceUnboundSlot(PARSER.parseExpression(expectedRangeExpr), mem);
Assertions.assertEquals(rangeExpression, splitPredicate.getRangePredicate());
} else {
Assertions.assertNull(splitPredicate.getRangePredicate());
Assertions.assertEquals(splitPredicate.getRangePredicate(), BooleanLiteral.TRUE);
}

if (!StringUtils.isEmpty(expectedResidualExpr)) {
Expression residualExpression = replaceUnboundSlot(PARSER.parseExpression(expectedResidualExpr), mem);
Assertions.assertEquals(residualExpression, splitPredicate.getResidualPredicate());
} else {
Assertions.assertNull(splitPredicate.getResidualPredicate());
Assertions.assertEquals(splitPredicate.getResidualPredicate(), BooleanLiteral.TRUE);
}
}

Expand Down

0 comments on commit 36fa988

Please sign in to comment.