Skip to content

Commit

Permalink
fix or
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses-you committed Jul 7, 2020
1 parent 0d982d2 commit f45d6c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ object OptimizeIn extends Rule[LogicalPlan] {
optimizeIn(expr, v, list)
} else if (convertible.nonEmpty && nonConvertible.nonEmpty) {
val optimizedIn = optimizeIn(In(v, convertible), v, convertible)
And(optimizedIn, In(v, nonConvertible))
Or(optimizedIn, In(v, nonConvertible))
} else {
expr
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class OptimizeInSuite extends PlanTest {
val correctAnswer1 =
testRelation
.where(
And(EqualTo(UnresolvedAttribute("a"), Literal(1)),
Or(EqualTo(UnresolvedAttribute("a"), Literal(1)),
In(UnresolvedAttribute("a"), Seq(UnresolvedAttribute("b"))))
)
.analyze
Expand Down

0 comments on commit f45d6c3

Please sign in to comment.