cloud-fan commented on code in PR #37393:
URL: https://github.com/apache/spark/pull/37393#discussion_r938782700
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala:
##########
@@ -277,14 +277,14 @@ class DataSourceV2Strategy(session: SparkSession) extends
Strategy with Predicat
// correctness depends on removing all matching data.
val filters = DataSourceStrategy.normalizeExprs(Seq(condition),
output)
.flatMap(splitConjunctivePredicates(_).map {
- f => DataSourceStrategy.translateFilter(f, true).getOrElse(
+ f => DataSourceV2Strategy.translateFilterV2(f).getOrElse(
throw
QueryCompilationErrors.cannotTranslateExpressionToSourceFilterError(f))
Review Comment:
`SupportsDelete` is different from runtime filtering. For runtime filtering,
we need to push as many predicates as possible, but this is just a perf
improvement. `SupportsDelete` must take all predicates, otherwise the source
can't delete enough data which leads to wrong query result later. We need to
follow the same behavior in
https://github.com/apache/spark/pull/37393/files#diff-dc485c81773a73a5a462994af50e17a5043a8d66c47399cf29b0a3cb56c85591R80
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]