File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -516,9 +516,9 @@ object DataSourceStrategy {
516516 * Tries to translate a Catalyst [[Expression ]] into data source [[Filter ]].
517517 *
518518 * @param predicate The input [[Expression ]] to be translated as [[Filter ]]
519- * @param translatedFilterToExpr Optional Mapping of all the leaf node filter expression to its
520- * translated [[Filter ]]. The map is used for rebuilding Expression
521- * from [[Filter ]]s .
519+ * @param translatedFilterToExpr An optional map from leaf node filter expressions to its
520+ * translated [[Filter ]]. The map is used for rebuilding
521+ * [[ Expression ]] from [[Filter ]].
522522 * @return a `Some[Filter]` if the input [[Expression ]] is convertible, otherwise a `None`.
523523 */
524524 protected [sql] def translateFilterWithMapping (
Original file line number Diff line number Diff line change @@ -44,7 +44,10 @@ object DataSourceV2Strategy extends Strategy with PredicateHelper {
4444 filters : Seq [Expression ]): (Seq [Expression ], Seq [Expression ]) = {
4545 scanBuilder match {
4646 case r : SupportsPushDownFilters =>
47- // A map from translated data source filters to original catalyst filter expressions.
47+ // A map from translated data source leaf node filters to original catalyst filter
48+ // expressions. For a `And`/`Or` predicate, it is possible that the predicate is partially
49+ // pushed down. This map can used to construct a catalyst filter expression from the input
50+ // filter, or a superset(partial push down filter) of the input filter.
4851 val translatedFilterToExpr = mutable.HashMap .empty[sources.Filter , Expression ]
4952 val translatedFilters = mutable.ArrayBuffer .empty[sources.Filter ]
5053 // Catalyst filter expression that can't be translated to data source filters.
You can’t perform that action at this time.
0 commit comments