cloud-fan commented on code in PR #39377:
URL: https://github.com/apache/spark/pull/39377#discussion_r1063256483
##########
sql/core/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -146,7 +147,7 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with
PredicateHelper with J
predicateReference ++ condition.references,
hasHitFilter = true,
hasHitSelectiveFilter = hasHitSelectiveFilter ||
isLikelySelective(condition))
- case _: LeafNode => hasHitSelectiveFilter
+ case l: LeafNode => hasHitSelectiveFilter || hasSelectivePredicate(l)
Review Comment:
how about we add a new trait `LeafNodeWithAccurateStats`? `InMemoryRelation`
will be the only implementation. Then here we can just do
```
case l: LeafNodeWithAccurateStats => l.stats.rowCount.exists(_ <
a_threshold)
```
--
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]