Packages

object JoinSelection extends Strategy with PredicateHelper with JoinSelectionHelper

Select the proper physical plan for join based on join strategy hints, the availability of equi-join keys and the sizes of joining relations. Below are the existing join strategies, their characteristics and their limitations.

- Broadcast hash join (BHJ): Only supported for equi-joins, while the join keys do not need to be sortable. Supported for all join types except full outer joins. BHJ usually performs faster than the other join algorithms when the broadcast side is small. However, broadcasting tables is a network-intensive operation and it could cause OOM or perform badly in some cases, especially when the build/broadcast side is big.

- Shuffle hash join: Only supported for equi-joins, while the join keys do not need to be sortable. Supported for all join types. Building hash map from table is a memory-intensive operation and it could cause OOM when the build side is big.

- Shuffle sort merge join (SMJ): Only supported for equi-joins and the join keys have to be sortable. Supported for all join types.

- Broadcast nested loop join (BNLJ): Supports both equi-joins and non-equi-joins. Supports all the join types, but the implementation is optimized for: 1) broadcasting the left side in a right outer join; 2) broadcasting the right side in a left outer, left semi, left anti or existence join; 3) broadcasting either side in an inner-like join. For other cases, we need to scan the data multiple times, which can be rather slow.

- Shuffle-and-replicate nested loop join (a.k.a. cartesian product join): Supports both equi-joins and non-equi-joins. Supports only inner like joins.

Linear Supertypes
JoinSelectionHelper, PredicateHelper, AliasHelper, SparkStrategy, GenericStrategy[SparkPlan], Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JoinSelection
  2. JoinSelectionHelper
  3. PredicateHelper
  4. AliasHelper
  5. SparkStrategy
  6. GenericStrategy
  7. Logging
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply(plan: LogicalPlan): Seq[SparkPlan]
    Definition Classes
    JoinSelection → GenericStrategy
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def buildBalancedPredicate(expressions: Seq[Expression], op: (Expression, Expression) ⇒ Expression): Expression
    Attributes
    protected
    Definition Classes
    PredicateHelper
  7. def canBroadcastBySize(plan: LogicalPlan, conf: SQLConf): Boolean
    Definition Classes
    JoinSelectionHelper
  8. def canBuildBroadcastLeft(joinType: JoinType): Boolean
    Definition Classes
    JoinSelectionHelper
  9. def canBuildBroadcastRight(joinType: JoinType): Boolean
    Definition Classes
    JoinSelectionHelper
  10. def canBuildShuffledHashJoinLeft(joinType: JoinType): Boolean
    Definition Classes
    JoinSelectionHelper
  11. def canBuildShuffledHashJoinRight(joinType: JoinType): Boolean
    Definition Classes
    JoinSelectionHelper
  12. def canEvaluate(expr: Expression, plan: LogicalPlan): Boolean
    Attributes
    protected
    Definition Classes
    PredicateHelper
  13. def canEvaluateWithinJoin(expr: Expression): Boolean
    Attributes
    protected
    Definition Classes
    PredicateHelper
  14. def canPlanAsBroadcastHashJoin(join: Join, conf: SQLConf): Boolean
    Definition Classes
    JoinSelectionHelper
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  18. def extractPredicatesWithinOutputSet(condition: Expression, outputSet: AttributeSet): Option[Expression]
    Attributes
    protected
    Definition Classes
    PredicateHelper
  19. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def findExpressionAndTrackLineageDown(exp: Expression, plan: LogicalPlan): Option[(Expression, LogicalPlan)]
    Definition Classes
    PredicateHelper
  21. def getAliasMap(exprs: Seq[NamedExpression]): AttributeMap[Alias]
    Attributes
    protected
    Definition Classes
    AliasHelper
  22. def getAliasMap(plan: Aggregate): AttributeMap[Alias]
    Attributes
    protected
    Definition Classes
    AliasHelper
  23. def getAliasMap(plan: Project): AttributeMap[Alias]
    Attributes
    protected
    Definition Classes
    AliasHelper
  24. def getBroadcastBuildSide(left: LogicalPlan, right: LogicalPlan, joinType: JoinType, hint: JoinHint, hintOnly: Boolean, conf: SQLConf): Option[BuildSide]
    Definition Classes
    JoinSelectionHelper
  25. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def getShuffleHashJoinBuildSide(left: LogicalPlan, right: LogicalPlan, joinType: JoinType, hint: JoinHint, hintOnly: Boolean, conf: SQLConf): Option[BuildSide]
    Definition Classes
    JoinSelectionHelper
  27. def getSmallerSide(left: LogicalPlan, right: LogicalPlan): BuildSide
    Definition Classes
    JoinSelectionHelper
  28. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. def hintToBroadcastLeft(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  30. def hintToBroadcastRight(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  31. def hintToNotBroadcastLeft(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  32. def hintToNotBroadcastRight(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  33. def hintToPreferShuffleHashJoinLeft(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  34. def hintToPreferShuffleHashJoinRight(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  35. def hintToShuffleHashJoinLeft(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  36. def hintToShuffleHashJoinRight(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  37. def hintToShuffleReplicateNL(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  38. def hintToSortMergeJoin(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  39. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  40. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  41. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  42. def isNullIntolerant(expr: Expression): Boolean
    Attributes
    protected
    Definition Classes
    PredicateHelper
  43. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  44. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  45. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  46. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  47. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  48. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  49. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  50. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  51. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  52. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  53. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  54. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  55. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  56. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  57. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  58. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  59. def outputWithNullability(output: Seq[Attribute], nonNullAttrExprIds: Seq[ExprId]): Seq[Attribute]
    Attributes
    protected
    Definition Classes
    PredicateHelper
  60. def planLater(plan: LogicalPlan): SparkPlan
    Attributes
    protected
    Definition Classes
    SparkStrategy → GenericStrategy
  61. def replaceAlias(expr: Expression, aliasMap: AttributeMap[Alias]): Expression
    Attributes
    protected
    Definition Classes
    AliasHelper
  62. def replaceAliasButKeepName(expr: NamedExpression, aliasMap: AttributeMap[Alias]): NamedExpression
    Attributes
    protected
    Definition Classes
    AliasHelper
  63. def splitConjunctivePredicates(condition: Expression): Seq[Expression]
    Attributes
    protected
    Definition Classes
    PredicateHelper
  64. def splitDisjunctivePredicates(condition: Expression): Seq[Expression]
    Attributes
    protected
    Definition Classes
    PredicateHelper
  65. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  66. def toString(): String
    Definition Classes
    AnyRef → Any
  67. def trimAliases(e: Expression): Expression
    Attributes
    protected
    Definition Classes
    AliasHelper
  68. def trimNonTopLevelAliases[T <: Expression](e: T): T
    Attributes
    protected
    Definition Classes
    AliasHelper
  69. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  70. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  71. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from JoinSelectionHelper

Inherited from PredicateHelper

Inherited from AliasHelper

Inherited from SparkStrategy

Inherited from GenericStrategy[SparkPlan]

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped