Packages

object JoinSelection extends Strategy 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, SparkStrategy, GenericStrategy[SparkPlan], Logging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JoinSelection
  2. JoinSelectionHelper
  3. SparkStrategy
  4. GenericStrategy
  5. Logging
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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 canBroadcastBySize(plan: LogicalPlan, conf: SQLConf): Boolean
    Definition Classes
    JoinSelectionHelper
  7. def canBuildBroadcastLeft(joinType: JoinType): Boolean
    Definition Classes
    JoinSelectionHelper
  8. def canBuildBroadcastRight(joinType: JoinType): Boolean
    Definition Classes
    JoinSelectionHelper
  9. def canBuildShuffledHashJoinLeft(joinType: JoinType): Boolean
    Definition Classes
    JoinSelectionHelper
  10. def canBuildShuffledHashJoinRight(joinType: JoinType): Boolean
    Definition Classes
    JoinSelectionHelper
  11. def canPlanAsBroadcastHashJoin(join: Join, conf: SQLConf): Boolean
    Definition Classes
    JoinSelectionHelper
  12. def canPruneLeft(joinType: JoinType): Boolean
    Definition Classes
    JoinSelectionHelper
  13. def canPruneRight(joinType: JoinType): Boolean
    Definition Classes
    JoinSelectionHelper
  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  18. def getBroadcastBuildSide(left: LogicalPlan, right: LogicalPlan, joinType: JoinType, hint: JoinHint, hintOnly: Boolean, conf: SQLConf): Option[BuildSide]
    Definition Classes
    JoinSelectionHelper
  19. def getBroadcastNestedLoopJoinBuildSide(hint: JoinHint): Option[BuildSide]
    Definition Classes
    JoinSelectionHelper
  20. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def getShuffleHashJoinBuildSide(left: LogicalPlan, right: LogicalPlan, joinType: JoinType, hint: JoinHint, hintOnly: Boolean, conf: SQLConf): Option[BuildSide]
    Definition Classes
    JoinSelectionHelper
  22. def getSmallerSide(left: LogicalPlan, right: LogicalPlan): BuildSide
    Definition Classes
    JoinSelectionHelper
  23. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  24. def hintToBroadcastLeft(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  25. def hintToBroadcastRight(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  26. def hintToNotBroadcastAndReplicate(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  27. def hintToNotBroadcastAndReplicateLeft(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  28. def hintToNotBroadcastAndReplicateRight(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  29. def hintToNotBroadcastLeft(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  30. def hintToNotBroadcastRight(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  31. def hintToPreferShuffleHashJoin(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  32. def hintToPreferShuffleHashJoinLeft(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  33. def hintToPreferShuffleHashJoinRight(hint: JoinHint): Boolean
    Definition Classes
    JoinSelectionHelper
  34. def hintToShuffleHashJoin(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 isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  43. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  44. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  45. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  46. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  47. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  48. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  49. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  50. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  51. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  52. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  53. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  54. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  55. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  56. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  57. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  58. def planLater(plan: LogicalPlan): SparkPlan
    Attributes
    protected
    Definition Classes
    SparkStrategy → GenericStrategy
  59. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  60. def toString(): String
    Definition Classes
    AnyRef → Any
  61. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  62. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  63. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from JoinSelectionHelper

Inherited from SparkStrategy

Inherited from GenericStrategy[SparkPlan]

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped