cloud-fan commented on code in PR #39170:
URL: https://github.com/apache/spark/pull/39170#discussion_r1163916095
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -114,51 +115,89 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with
PredicateHelper with J
}
/**
- * Returns whether the plan is a simple filter over scan and the filter is
likely selective
+ * Extracts the plan exists a simple filter over scan and the filter is
likely selective
* Also check if the plan only has simple expressions (attribute reference,
literals) so that we
* do not add a subquery that might have an expensive computation
*/
- private def isSelectiveFilterOverScan(plan: LogicalPlan): Boolean = {
+ private def extractSelectiveFilterOverScan(
+ plan: LogicalPlan,
+ filterCreationSideExp: Expression): Option[LogicalPlan] = {
@tailrec
def isSelective(
Review Comment:
we should rename this function now.
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/InjectRuntimeFilter.scala:
##########
@@ -114,51 +115,89 @@ object InjectRuntimeFilter extends Rule[LogicalPlan] with
PredicateHelper with J
}
/**
- * Returns whether the plan is a simple filter over scan and the filter is
likely selective
+ * Extracts the plan exists a simple filter over scan and the filter is
likely selective
* Also check if the plan only has simple expressions (attribute reference,
literals) so that we
* do not add a subquery that might have an expensive computation
*/
- private def isSelectiveFilterOverScan(plan: LogicalPlan): Boolean = {
+ private def extractSelectiveFilterOverScan(
+ plan: LogicalPlan,
+ filterCreationSideExp: Expression): Option[LogicalPlan] = {
@tailrec
def isSelective(
Review Comment:
probably just `def extract`
--
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]