File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,11 @@ trait PredicateHelper extends Logging {
201
201
case e => e.children.forall(canEvaluateWithinJoin)
202
202
}
203
203
204
+ /*
205
+ * Returns a filter that it's output is a subset of `outputSet` and it contains all possible constraints
206
+ * from `condition`. This is used for predicate pushdown.
207
+ * When there is no such convertible filter, `None` is returned.
208
+ */
204
209
protected def convertibleFilter (
205
210
condition : Expression ,
206
211
outputSet : AttributeSet ): Option [Expression ] = condition match {
@@ -231,6 +236,9 @@ trait PredicateHelper extends Logging {
231
236
rhs <- convertibleFilter(right, outputSet)
232
237
} yield Or (lhs, rhs)
233
238
239
+ // Here we assume all the `Not` operators is already below all the `And` and `Or` operators
240
+ // after the optimization rule `BooleanSimplification`, so that we don't need to handle the
241
+ // `Not` operators here.
234
242
case other =>
235
243
if (other.references.subsetOf(outputSet)) {
236
244
Some (other)
You can’t perform that action at this time.
0 commit comments