Skip to content

Commit

Permalink
added a condition for Not operator in ParquetFilter.
Browse files Browse the repository at this point in the history
  • Loading branch information
gatorsmile committed Dec 12, 2015
1 parent 03138b6 commit 79be2c3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ private[sql] object ParquetFilters {
rhsFilter <- createFilter(schema, rhs)
} yield FilterApi.or(lhsFilter, rhsFilter)

case sources.Not(pred) =>
// Here, we assume the Optimizer's rule BooleanSimplification has applied `Not` operator
// in the underlying `And` and `Or` expressions.
case sources.Not(pred)
if (!pred.isInstanceOf[sources.And] && !pred.isInstanceOf[sources.Or]) =>
createFilter(schema, pred).map(FilterApi.not)

case _ => None
Expand Down

0 comments on commit 79be2c3

Please sign in to comment.