Skip to content

Commit

Permalink
Change method name to hasScanOperation
Browse files Browse the repository at this point in the history
  • Loading branch information
c21 committed Jul 21, 2020
1 parent 7b20049 commit b1a8a92
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -115,9 +115,9 @@ case class CoalesceBucketsInJoin(conf: SQLConf) extends Rule[SparkPlan] {
*/
object ExtractJoinWithBuckets {
@tailrec
private def isScanOperation(plan: SparkPlan): Boolean = plan match {
case f: FilterExec => isScanOperation(f.child)
case p: ProjectExec => isScanOperation(p.child)
private def hasScanOperation(plan: SparkPlan): Boolean = plan match {
case f: FilterExec => hasScanOperation(f.child)
case p: ProjectExec => hasScanOperation(p.child)
case _: FileSourceScanExec => true
case _ => false
}
Expand Down Expand Up @@ -147,8 +147,8 @@ object ExtractJoinWithBuckets {
private def isApplicable(j: BaseJoinExec): Boolean = {
(j.isInstanceOf[SortMergeJoinExec] ||
j.isInstanceOf[ShuffledHashJoinExec]) &&
isScanOperation(j.left) &&
isScanOperation(j.right) &&
hasScanOperation(j.left) &&
hasScanOperation(j.right) &&
satisfiesOutputPartitioning(j.leftKeys, j.left.outputPartitioning) &&
satisfiesOutputPartitioning(j.rightKeys, j.right.outputPartitioning)
}
Expand Down

0 comments on commit b1a8a92

Please sign in to comment.