Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ public ValueDesc union(ValueDesc other) {
@Override
public ValueDesc intersect(ValueDesc other) {
Expression originExpr = ExpressionUtils.and(expr, other.expr);
return new UnknownValue(ImmutableList.of(this, other), originExpr, ExpressionUtils::or);
return new UnknownValue(ImmutableList.of(this, other), originExpr, ExpressionUtils::and);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public void testSimplify() {
assertRewrite("TA in (1) and TA in (1)", "TA = 1");
assertRewrite("(TA > 3 and TA < 1) and TB < 5", "FALSE");
assertRewrite("(TA > 3 and TA < 1) or TB < 5", "TB < 5");
assertRewrite("((IA = 1 AND SC ='1') OR SC = '1212') AND IA =1", "((IA = 1 AND SC ='1') OR SC = '1212') AND IA =1");
}

private void assertRewrite(String expression, String expected) {
Expand Down