Packages

object JoinSelection extends SparkStrategy 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

Type Members

  1. implicit class LogStringContext extends AnyRef
    Definition Classes
    Logging

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]) @IntrinsicCandidate() @native()
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def getBroadcastBuildSide(join: Join, hintOnly: Boolean, conf: SQLConf): Option[BuildSide]
    Definition Classes
    JoinSelectionHelper
  18. def getBroadcastNestedLoopJoinBuildSide(hint: JoinHint, joinType: JoinType): Option[BuildSide]
    Definition Classes
    JoinSelectionHelper
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  20. def getShuffleHashJoinBuildSide(join: Join, hintOnly: Boolean, conf: SQLConf): Option[BuildSide]
    Definition Classes
    JoinSelectionHelper
  21. def getSmallerSide(left: LogicalPlan, right: LogicalPlan): BuildSide
    Definition Classes
    JoinSelectionHelper
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  23. def hashJoinSupported(leftKeys: Seq[Expression], rightKeys: Seq[Expression]): Boolean
    Attributes
    protected
    Definition Classes
    JoinSelectionHelper
  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(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  46. def logDebug(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  47. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  48. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  49. def logError(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  50. def logError(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  51. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  52. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  53. def logInfo(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  54. def logInfo(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  55. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  56. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  57. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  58. def logTrace(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  59. def logTrace(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  60. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  61. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  62. def logWarning(entry: LogEntry, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  63. def logWarning(entry: LogEntry): Unit
    Attributes
    protected
    Definition Classes
    Logging
  64. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  65. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  66. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  67. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  68. def planLater(plan: LogicalPlan): SparkPlan
    Attributes
    protected
    Definition Classes
    SparkStrategy → GenericStrategy
  69. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  70. def toString(): String
    Definition Classes
    AnyRef → Any
  71. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  72. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  73. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  74. def withLogContext(context: Map[String, String])(body: => Unit): Unit
    Attributes
    protected
    Definition Classes
    Logging

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from JoinSelectionHelper

Inherited from SparkStrategy

Inherited from GenericStrategy[SparkPlan]

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped