LuciferYang commented on code in PR #60387:
URL: https://github.com/apache/spark/pull/60387#discussion_r4614947598
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -239,11 +251,23 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with
PredicateHelper with J
useMaterializedThreshold = false))
case _ => None
}
- case _: LeafNode if hasHitSelectiveFilter =>
+ // The bloom filter's subquery reads a DSv2 scan again, so only a scan
marked with
+ // `repeatableRead` counts, with or without a selective `Filter` above
it. A pushed limit, for
+ // example, lets the source pick other rows on a second read. The pushed
filters it records
+ // must be simple, as the condition of a `Filter` must.
+ case scan: DataSourceV2ScanRelation
Review Comment:
Correction to my reply above: SPARK-61870 now has its own PR, #60672, with
`repeatableRead`, the check in `InjectRuntimeFilter` and the RotatingLimit
test, so that it can be reviewed and backported on its own. This PR builds on
it, and I removed SPARK-61870 from the title.
--
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]