Packages

case class DistanceJoinExec(left: SparkPlan, right: SparkPlan, leftShape: Expression, rightShape: Expression, swappedLeftAndRight: Boolean, distance: Expression, spatialPredicate: SpatialPredicate, extraCondition: Option[Expression] = None) extends SparkPlan with SedonaBinaryExecNode with TraitJoinQueryExec with Logging with Product with Serializable

Distance joins requires matching geometries to be in the same partition, despite not necessarily overlapping. To create an overlap and guarantee matching geometries end up in the same partition, the left geometry is expanded before partitioning. It's the logical equivalent of:

select * from a join b on ST_Distance(a.geom, b.geom) <= 1

becomes

select * from a join b on ST_Intersects(ST_Envelope(ST_Buffer(a.geom, 1)), b.geom) and ST_Distance(a.geom, b.geom) <= 1

left

left side of the join

right

right side of the join

leftShape

expression for the first argument of spatialPredicate

rightShape

expression for the second argument of spatialPredicate

swappedLeftAndRight

boolean indicating whether left and right plans were swapped

distance

- ST_Distance(left, right) <= distance. Distance can be literal or a computation over 'left'.

spatialPredicate

spatial predicate as join condition

extraCondition

extra join condition other than spatialPredicate

Linear Supertypes
TraitJoinQueryExec, TraitJoinQueryBase, SedonaBinaryExecNode, SparkPlan, Serializable, Logging, QueryPlan[SparkPlan], SQLConfHelper, TreeNode[SparkPlan], TreePatternBits, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DistanceJoinExec
  2. TraitJoinQueryExec
  3. TraitJoinQueryBase
  4. SedonaBinaryExecNode
  5. SparkPlan
  6. Serializable
  7. Logging
  8. QueryPlan
  9. SQLConfHelper
  10. TreeNode
  11. TreePatternBits
  12. Product
  13. Equals
  14. AnyRef
  15. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new DistanceJoinExec(left: SparkPlan, right: SparkPlan, leftShape: Expression, rightShape: Expression, swappedLeftAndRight: Boolean, distance: Expression, spatialPredicate: SpatialPredicate, extraCondition: Option[Expression] = None)

    left

    left side of the join

    right

    right side of the join

    leftShape

    expression for the first argument of spatialPredicate

    rightShape

    expression for the second argument of spatialPredicate

    swappedLeftAndRight

    boolean indicating whether left and right plans were swapped

    distance

    - ST_Distance(left, right) <= distance. Distance can be literal or a computation over 'left'.

    spatialPredicate

    spatial predicate as join condition

    extraCondition

    extra join condition other than spatialPredicate

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. lazy val allAttributes: AttributeSeq
    Definition Classes
    QueryPlan
  5. def apply(number: Int): TreeNode[_]
    Definition Classes
    TreeNode
  6. def argString(maxFields: Int): String
    Definition Classes
    TreeNode
  7. def asCode: String
    Definition Classes
    TreeNode
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. final lazy val canonicalized: SparkPlan
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  10. final def children: Seq[SparkPlan]
    Definition Classes
    SedonaBinaryExecNode → TreeNode
  11. def cleanupResources(): Unit
    Attributes
    protected[sql]
    Definition Classes
    SparkPlan
  12. def clone(): SparkPlan
    Definition Classes
    TreeNode → AnyRef
  13. def collect[B](pf: PartialFunction[SparkPlan, B]): Seq[B]
    Definition Classes
    TreeNode
  14. def collectFirst[B](pf: PartialFunction[SparkPlan, B]): Option[B]
    Definition Classes
    TreeNode
  15. def collectLeaves(): Seq[SparkPlan]
    Definition Classes
    TreeNode
  16. def collectWithSubqueries[B](f: PartialFunction[SparkPlan, B]): Seq[B]
    Definition Classes
    QueryPlan
  17. def conf: SQLConf
    Definition Classes
    SparkPlan → SQLConfHelper
  18. final def containsAllPatterns(patterns: TreePattern*): Boolean
    Definition Classes
    TreePatternBits
  19. final def containsAnyPattern(patterns: TreePattern*): Boolean
    Definition Classes
    TreePatternBits
  20. lazy val containsChild: Set[TreeNode[_]]
    Definition Classes
    TreeNode
  21. final def containsPattern(t: TreePattern): Boolean
    Definition Classes
    TreePatternBits
    Annotations
    @inline()
  22. def copyTagsFrom(other: SparkPlan): Unit
    Definition Classes
    TreeNode
  23. lazy val deterministic: Boolean
    Definition Classes
    QueryPlan
  24. val distance: Expression
  25. def doCanonicalize(): SparkPlan
    Attributes
    protected
    Definition Classes
    QueryPlan
  26. def doExecute(): RDD[InternalRow]
    Attributes
    protected
    Definition Classes
    TraitJoinQueryExec
  27. def doExecuteBroadcast[T](): Broadcast[T]
    Attributes
    protected[sql]
    Definition Classes
    SparkPlan
  28. def doExecuteColumnar(): RDD[ColumnarBatch]
    Attributes
    protected
    Definition Classes
    SparkPlan
  29. def doPrepare(): Unit
    Attributes
    protected
    Definition Classes
    SparkPlan
  30. def doSpatialPartitioning(dominantShapes: SpatialRDD[Geometry], followerShapes: SpatialRDD[Geometry], numPartitions: Integer, sedonaConf: SedonaConf): Unit
    Definition Classes
    TraitJoinQueryBase
  31. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def execute(): RDD[InternalRow]
    Definition Classes
    SparkPlan
  33. final def executeBroadcast[T](): Broadcast[T]
    Definition Classes
    SparkPlan
  34. def executeCollect(): Array[InternalRow]
    Definition Classes
    SparkPlan
  35. def executeCollectPublic(): Array[Row]
    Definition Classes
    SparkPlan
  36. final def executeColumnar(): RDD[ColumnarBatch]
    Definition Classes
    SparkPlan
  37. final def executeQuery[T](query: => T): T
    Attributes
    protected
    Definition Classes
    SparkPlan
  38. def executeTail(n: Int): Array[InternalRow]
    Definition Classes
    SparkPlan
  39. def executeTake(n: Int): Array[InternalRow]
    Definition Classes
    SparkPlan
  40. def executeToIterator(): Iterator[InternalRow]
    Definition Classes
    SparkPlan
  41. def exists(f: (SparkPlan) => Boolean): Boolean
    Definition Classes
    TreeNode
  42. final def expressions: Seq[Expression]
    Definition Classes
    QueryPlan
  43. val extraCondition: Option[Expression]
    Definition Classes
    DistanceJoinExecTraitJoinQueryExec
  44. def fastEquals(other: TreeNode[_]): Boolean
    Definition Classes
    TreeNode
  45. def find(f: (SparkPlan) => Boolean): Option[SparkPlan]
    Definition Classes
    TreeNode
  46. def flatMap[A](f: (SparkPlan) => TraversableOnce[A]): Seq[A]
    Definition Classes
    TreeNode
  47. def foreach(f: (SparkPlan) => Unit): Unit
    Definition Classes
    TreeNode
  48. def foreachUp(f: (SparkPlan) => Unit): Unit
    Definition Classes
    TreeNode
  49. def formattedNodeName: String
    Attributes
    protected
    Definition Classes
    QueryPlan
  50. def generateTreeString(depth: Int, lastChildren: Seq[Boolean], append: (String) => Unit, verbose: Boolean, prefix: String, addSuffix: Boolean, maxFields: Int, printNodeId: Boolean, indent: Int): Unit
    Definition Classes
    TreeNode
  51. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  52. def getDefaultTreePatternBits: BitSet
    Attributes
    protected
    Definition Classes
    TreeNode
  53. def getTagValue[T](tag: TreeNodeTag[T]): Option[T]
    Definition Classes
    TreeNode
  54. def hashCode(): Int
    Definition Classes
    TreeNode → AnyRef → Any
  55. val id: Int
    Definition Classes
    SparkPlan
  56. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  57. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  58. def innerChildren: Seq[QueryPlan[_]]
    Definition Classes
    QueryPlan → TreeNode
  59. def inputSet: AttributeSet
    Definition Classes
    QueryPlan
  60. def isCanonicalizedPlan: Boolean
    Attributes
    protected
    Definition Classes
    QueryPlan
  61. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  62. def isRuleIneffective(ruleId: RuleId): Boolean
    Attributes
    protected
    Definition Classes
    TreeNode
  63. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  64. def joinPartitionNumOptimizer(dominantSidePartNum: Int, followerSidePartNum: Int, dominantSideCount: Long): Int
    Definition Classes
    TraitJoinQueryExec
  65. def jsonFields: List[JField]
    Attributes
    protected
    Definition Classes
    TreeNode
  66. val left: SparkPlan
  67. val leftShape: Expression
    Definition Classes
    DistanceJoinExecTraitJoinQueryExec
  68. final def legacyWithNewChildren(newChildren: Seq[SparkPlan]): SparkPlan
    Attributes
    protected
    Definition Classes
    TreeNode
  69. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  70. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  71. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  72. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  73. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  74. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  75. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  76. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  77. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  78. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  79. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  80. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  81. def logicalLink: Option[LogicalPlan]
    Definition Classes
    SparkPlan
  82. def longMetric(name: String): SQLMetric
    Definition Classes
    SparkPlan
  83. def makeCopy(newArgs: Array[AnyRef]): SparkPlan
    Definition Classes
    SparkPlan → TreeNode
  84. def map[A](f: (SparkPlan) => A): Seq[A]
    Definition Classes
    TreeNode
  85. def mapChildren(f: (SparkPlan) => SparkPlan): SparkPlan
    Definition Classes
    TreeNode
  86. def mapExpressions(f: (Expression) => Expression): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  87. def mapProductIterator[B](f: (Any) => B)(implicit arg0: ClassTag[B]): Array[B]
    Attributes
    protected
    Definition Classes
    TreeNode
  88. def markRuleAsIneffective(ruleId: RuleId): Unit
    Attributes
    protected
    Definition Classes
    TreeNode
  89. def metrics: Map[String, SQLMetric]
    Definition Classes
    SparkPlan
  90. final def missingInput: AttributeSet
    Definition Classes
    QueryPlan
  91. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  92. def nodeName: String
    Definition Classes
    TreeNode
  93. val nodePatterns: Seq[TreePattern]
    Attributes
    protected
    Definition Classes
    TreeNode
  94. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  95. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  96. def numberedTreeString: String
    Definition Classes
    TreeNode
  97. val origin: Origin
    Definition Classes
    TreeNode
  98. def otherCopyArgs: Seq[AnyRef]
    Attributes
    protected
    Definition Classes
    TreeNode
  99. def output: Seq[Attribute]
    Definition Classes
    TraitJoinQueryExec
  100. def outputOrdering: Seq[SortOrder]
    Definition Classes
    SparkPlan
  101. def outputPartitioning: Partitioning
    Definition Classes
    SparkPlan
  102. lazy val outputSet: AttributeSet
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  103. def p(number: Int): SparkPlan
    Definition Classes
    TreeNode
  104. final def prepare(): Unit
    Definition Classes
    SparkPlan
  105. def prepareSubqueries(): Unit
    Attributes
    protected
    Definition Classes
    SparkPlan
  106. def prettyJson: String
    Definition Classes
    TreeNode
  107. def printSchema(): Unit
    Definition Classes
    QueryPlan
  108. def producedAttributes: AttributeSet
    Definition Classes
    QueryPlan
  109. def productElementNames: Iterator[String]
    Definition Classes
    Product
  110. lazy val references: AttributeSet
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  111. def requiredChildDistribution: Seq[Distribution]
    Definition Classes
    SparkPlan
  112. def requiredChildOrdering: Seq[Seq[SortOrder]]
    Definition Classes
    SparkPlan
  113. def resetMetrics(): Unit
    Definition Classes
    SparkPlan
  114. def rewriteAttrs(attrMap: AttributeMap[Attribute]): SparkPlan
    Definition Classes
    QueryPlan
  115. val right: SparkPlan
  116. val rightShape: Expression
    Definition Classes
    DistanceJoinExecTraitJoinQueryExec
  117. final def sameResult(other: SparkPlan): Boolean
    Definition Classes
    QueryPlan
  118. lazy val schema: StructType
    Definition Classes
    QueryPlan
  119. def schemaString: String
    Definition Classes
    QueryPlan
  120. final def semanticHash(): Int
    Definition Classes
    QueryPlan
  121. final val session: SparkSession
    Definition Classes
    SparkPlan
  122. def setLogicalLink(logicalPlan: LogicalPlan): Unit
    Definition Classes
    SparkPlan
  123. def setTagValue[T](tag: TreeNodeTag[T], value: T): Unit
    Definition Classes
    TreeNode
  124. def simpleString(maxFields: Int): String
    Definition Classes
    QueryPlan → TreeNode
  125. def simpleStringWithNodeId(): String
    Definition Classes
    QueryPlan → TreeNode
  126. def sparkContext: SparkContext
    Attributes
    protected
    Definition Classes
    SparkPlan
  127. val spatialPredicate: SpatialPredicate
    Definition Classes
    DistanceJoinExecTraitJoinQueryExec
  128. def statePrefix: String
    Attributes
    protected
    Definition Classes
    QueryPlan
  129. def stringArgs: Iterator[Any]
    Attributes
    protected
    Definition Classes
    TreeNode
  130. lazy val subqueries: Seq[SparkPlan]
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  131. def subqueriesAll: Seq[SparkPlan]
    Definition Classes
    QueryPlan
  132. def supportsColumnar: Boolean
    Definition Classes
    SparkPlan
  133. def supportsRowBased: Boolean
    Definition Classes
    SparkPlan
  134. val swappedLeftAndRight: Boolean
    Definition Classes
    DistanceJoinExecTraitJoinQueryExec
  135. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  136. def toExpandedEnvelopeRDD(rdd: RDD[UnsafeRow], shapeExpression: Expression, boundRadius: Expression): SpatialRDD[Geometry]
    Definition Classes
    TraitJoinQueryBase
  137. def toJSON: String
    Definition Classes
    TreeNode
  138. def toRowBased: SparkPlan
    Definition Classes
    SparkPlan
  139. def toSpatialRDD(rdd: RDD[UnsafeRow], shapeExpression: Expression): SpatialRDD[Geometry]
    Definition Classes
    TraitJoinQueryBase
  140. def toSpatialRddPair(buildRdd: RDD[UnsafeRow], buildExpr: Expression, streamedRdd: RDD[UnsafeRow], streamedExpr: Expression): (SpatialRDD[Geometry], SpatialRDD[Geometry])
    Definition Classes
    DistanceJoinExecTraitJoinQueryBase
  141. def toString(): String
    Definition Classes
    TreeNode → AnyRef → Any
  142. def transform(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  143. def transformAllExpressions(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  144. def transformAllExpressionsWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  145. def transformDown(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  146. def transformDownWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  147. def transformDownWithSubqueries(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    QueryPlan
  148. def transformDownWithSubqueriesAndPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    QueryPlan
  149. def transformExpressions(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  150. def transformExpressionsDown(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  151. def transformExpressionsDownWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  152. def transformExpressionsUp(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  153. def transformExpressionsUpWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  154. def transformExpressionsWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  155. def transformUp(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  156. def transformUpWithBeforeAndAfterRuleOnChildren(cond: (SparkPlan) => Boolean, ruleId: RuleId)(rule: PartialFunction[(SparkPlan, SparkPlan), SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  157. def transformUpWithNewOutput(rule: PartialFunction[SparkPlan, (SparkPlan, Seq[(Attribute, Attribute)])], skipCond: (SparkPlan) => Boolean, canGetOutput: (SparkPlan) => Boolean): SparkPlan
    Definition Classes
    QueryPlan
  158. def transformUpWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  159. def transformUpWithSubqueries(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    QueryPlan
  160. def transformWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  161. def transformWithSubqueries(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    QueryPlan
  162. lazy val treePatternBits: BitSet
    Definition Classes
    QueryPlan → TreeNode → TreePatternBits
  163. def treeString(append: (String) => Unit, verbose: Boolean, addSuffix: Boolean, maxFields: Int, printOperatorId: Boolean): Unit
    Definition Classes
    TreeNode
  164. final def treeString(verbose: Boolean, addSuffix: Boolean, maxFields: Int, printOperatorId: Boolean): String
    Definition Classes
    TreeNode
  165. final def treeString: String
    Definition Classes
    TreeNode
  166. def unsetTagValue[T](tag: TreeNodeTag[T]): Unit
    Definition Classes
    TreeNode
  167. def updateOuterReferencesInSubquery(plan: SparkPlan, attrMap: AttributeMap[Attribute]): SparkPlan
    Attributes
    protected
    Definition Classes
    QueryPlan
  168. def vectorTypes: Option[Seq[String]]
    Definition Classes
    SparkPlan
  169. def verboseString(maxFields: Int): String
    Definition Classes
    QueryPlan → TreeNode
  170. def verboseStringWithOperatorId(): String
    Definition Classes
    QueryPlan
  171. def verboseStringWithSuffix(maxFields: Int): String
    Definition Classes
    TreeNode
  172. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  173. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  174. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  175. def waitForSubqueries(): Unit
    Attributes
    protected
    Definition Classes
    SparkPlan
  176. final def withNewChildren(newChildren: Seq[SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  177. def withNewChildrenInternal(newLeft: SparkPlan, newRight: SparkPlan): SparkPlan
    Attributes
    protected
    Definition Classes
    DistanceJoinExecSedonaBinaryExecNode
  178. final def withNewChildrenInternal(newChildren: IndexedSeq[SparkPlan]): SparkPlan
    Definition Classes
    SedonaBinaryExecNode → TreeNode

Deprecated Value Members

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

Inherited from TraitJoinQueryExec

Inherited from TraitJoinQueryBase

Inherited from SedonaBinaryExecNode

Inherited from SparkPlan

Inherited from Serializable

Inherited from Logging

Inherited from QueryPlan[SparkPlan]

Inherited from SQLConfHelper

Inherited from TreeNode[SparkPlan]

Inherited from TreePatternBits

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped