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 finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  46. def find(f: (SparkPlan) => Boolean): Option[SparkPlan]
    Definition Classes
    TreeNode
  47. def flatMap[A](f: (SparkPlan) => TraversableOnce[A]): Seq[A]
    Definition Classes
    TreeNode
  48. def foreach(f: (SparkPlan) => Unit): Unit
    Definition Classes
    TreeNode
  49. def foreachUp(f: (SparkPlan) => Unit): Unit
    Definition Classes
    TreeNode
  50. def formattedNodeName: String
    Attributes
    protected
    Definition Classes
    QueryPlan
  51. 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
  52. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  53. def getDefaultTreePatternBits: BitSet
    Attributes
    protected
    Definition Classes
    TreeNode
  54. def getTagValue[T](tag: TreeNodeTag[T]): Option[T]
    Definition Classes
    TreeNode
  55. def hashCode(): Int
    Definition Classes
    TreeNode → AnyRef → Any
  56. val id: Int
    Definition Classes
    SparkPlan
  57. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  58. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  59. def innerChildren: Seq[QueryPlan[_]]
    Definition Classes
    QueryPlan → TreeNode
  60. def inputSet: AttributeSet
    Definition Classes
    QueryPlan
  61. def isCanonicalizedPlan: Boolean
    Attributes
    protected
    Definition Classes
    QueryPlan
  62. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  63. def isRuleIneffective(ruleId: RuleId): Boolean
    Attributes
    protected
    Definition Classes
    TreeNode
  64. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  65. def joinPartitionNumOptimizer(dominantSidePartNum: Int, followerSidePartNum: Int, dominantSideCount: Long): Int
    Definition Classes
    TraitJoinQueryExec
  66. def jsonFields: List[JField]
    Attributes
    protected
    Definition Classes
    TreeNode
  67. val left: SparkPlan
  68. val leftShape: Expression
    Definition Classes
    DistanceJoinExecTraitJoinQueryExec
  69. final def legacyWithNewChildren(newChildren: Seq[SparkPlan]): SparkPlan
    Attributes
    protected
    Definition Classes
    TreeNode
  70. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  71. def logDebug(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  72. def logDebug(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  73. def logError(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  74. def logError(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  75. def logInfo(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  76. def logInfo(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  77. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  78. def logTrace(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  79. def logTrace(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  80. def logWarning(msg: => String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  81. def logWarning(msg: => String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  82. def logicalLink: Option[LogicalPlan]
    Definition Classes
    SparkPlan
  83. def longMetric(name: String): SQLMetric
    Definition Classes
    SparkPlan
  84. def makeCopy(newArgs: Array[AnyRef]): SparkPlan
    Definition Classes
    SparkPlan → TreeNode
  85. def map[A](f: (SparkPlan) => A): Seq[A]
    Definition Classes
    TreeNode
  86. def mapChildren(f: (SparkPlan) => SparkPlan): SparkPlan
    Definition Classes
    TreeNode
  87. def mapExpressions(f: (Expression) => Expression): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  88. def mapProductIterator[B](f: (Any) => B)(implicit arg0: ClassTag[B]): Array[B]
    Attributes
    protected
    Definition Classes
    TreeNode
  89. def markRuleAsIneffective(ruleId: RuleId): Unit
    Attributes
    protected
    Definition Classes
    TreeNode
  90. def metrics: Map[String, SQLMetric]
    Definition Classes
    SparkPlan
  91. final def missingInput: AttributeSet
    Definition Classes
    QueryPlan
  92. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  93. def nodeName: String
    Definition Classes
    TreeNode
  94. val nodePatterns: Seq[TreePattern]
    Attributes
    protected
    Definition Classes
    TreeNode
  95. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  96. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  97. def numberedTreeString: String
    Definition Classes
    TreeNode
  98. val origin: Origin
    Definition Classes
    TreeNode
  99. def otherCopyArgs: Seq[AnyRef]
    Attributes
    protected
    Definition Classes
    TreeNode
  100. def output: Seq[Attribute]
    Definition Classes
    TraitJoinQueryExec
  101. def outputOrdering: Seq[SortOrder]
    Definition Classes
    SparkPlan
  102. def outputPartitioning: Partitioning
    Definition Classes
    SparkPlan
  103. lazy val outputSet: AttributeSet
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  104. def p(number: Int): SparkPlan
    Definition Classes
    TreeNode
  105. final def prepare(): Unit
    Definition Classes
    SparkPlan
  106. def prepareSubqueries(): Unit
    Attributes
    protected
    Definition Classes
    SparkPlan
  107. def prettyJson: String
    Definition Classes
    TreeNode
  108. def printSchema(): Unit
    Definition Classes
    QueryPlan
  109. def producedAttributes: AttributeSet
    Definition Classes
    QueryPlan
  110. def productElementNames: Iterator[String]
    Definition Classes
    Product
  111. lazy val references: AttributeSet
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  112. def requiredChildDistribution: Seq[Distribution]
    Definition Classes
    SparkPlan
  113. def requiredChildOrdering: Seq[Seq[SortOrder]]
    Definition Classes
    SparkPlan
  114. def resetMetrics(): Unit
    Definition Classes
    SparkPlan
  115. def rewriteAttrs(attrMap: AttributeMap[Attribute]): SparkPlan
    Definition Classes
    QueryPlan
  116. val right: SparkPlan
  117. val rightShape: Expression
    Definition Classes
    DistanceJoinExecTraitJoinQueryExec
  118. final def sameResult(other: SparkPlan): Boolean
    Definition Classes
    QueryPlan
  119. lazy val schema: StructType
    Definition Classes
    QueryPlan
  120. def schemaString: String
    Definition Classes
    QueryPlan
  121. final def semanticHash(): Int
    Definition Classes
    QueryPlan
  122. final val session: SparkSession
    Definition Classes
    SparkPlan
  123. def setLogicalLink(logicalPlan: LogicalPlan): Unit
    Definition Classes
    SparkPlan
  124. def setTagValue[T](tag: TreeNodeTag[T], value: T): Unit
    Definition Classes
    TreeNode
  125. def simpleString(maxFields: Int): String
    Definition Classes
    QueryPlan → TreeNode
  126. def simpleStringWithNodeId(): String
    Definition Classes
    QueryPlan → TreeNode
  127. def sparkContext: SparkContext
    Attributes
    protected
    Definition Classes
    SparkPlan
  128. val spatialPredicate: SpatialPredicate
    Definition Classes
    DistanceJoinExecTraitJoinQueryExec
  129. def statePrefix: String
    Attributes
    protected
    Definition Classes
    QueryPlan
  130. def stringArgs: Iterator[Any]
    Attributes
    protected
    Definition Classes
    TreeNode
  131. lazy val subqueries: Seq[SparkPlan]
    Definition Classes
    QueryPlan
    Annotations
    @transient()
  132. def subqueriesAll: Seq[SparkPlan]
    Definition Classes
    QueryPlan
  133. def supportsColumnar: Boolean
    Definition Classes
    SparkPlan
  134. def supportsRowBased: Boolean
    Definition Classes
    SparkPlan
  135. val swappedLeftAndRight: Boolean
    Definition Classes
    DistanceJoinExecTraitJoinQueryExec
  136. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  137. def toExpandedEnvelopeRDD(rdd: RDD[UnsafeRow], shapeExpression: Expression, boundRadius: Expression): SpatialRDD[Geometry]
    Definition Classes
    TraitJoinQueryBase
  138. def toJSON: String
    Definition Classes
    TreeNode
  139. def toRowBased: SparkPlan
    Definition Classes
    SparkPlan
  140. def toSpatialRDD(rdd: RDD[UnsafeRow], shapeExpression: Expression): SpatialRDD[Geometry]
    Definition Classes
    TraitJoinQueryBase
  141. def toSpatialRddPair(buildRdd: RDD[UnsafeRow], buildExpr: Expression, streamedRdd: RDD[UnsafeRow], streamedExpr: Expression): (SpatialRDD[Geometry], SpatialRDD[Geometry])
    Definition Classes
    DistanceJoinExecTraitJoinQueryBase
  142. def toString(): String
    Definition Classes
    TreeNode → AnyRef → Any
  143. def transform(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  144. def transformAllExpressions(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  145. def transformAllExpressionsWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  146. def transformDown(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  147. def transformDownWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  148. def transformDownWithSubqueries(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    QueryPlan
  149. def transformDownWithSubqueriesAndPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    QueryPlan
  150. def transformExpressions(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  151. def transformExpressionsDown(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  152. def transformExpressionsDownWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  153. def transformExpressionsUp(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  154. def transformExpressionsUpWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  155. def transformExpressionsWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
    Definition Classes
    QueryPlan
  156. def transformUp(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  157. def transformUpWithBeforeAndAfterRuleOnChildren(cond: (SparkPlan) => Boolean, ruleId: RuleId)(rule: PartialFunction[(SparkPlan, SparkPlan), SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  158. def transformUpWithNewOutput(rule: PartialFunction[SparkPlan, (SparkPlan, Seq[(Attribute, Attribute)])], skipCond: (SparkPlan) => Boolean, canGetOutput: (SparkPlan) => Boolean): SparkPlan
    Definition Classes
    QueryPlan
  159. def transformUpWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  160. def transformUpWithSubqueries(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    QueryPlan
  161. def transformWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  162. def transformWithSubqueries(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
    Definition Classes
    QueryPlan
  163. lazy val treePatternBits: BitSet
    Definition Classes
    QueryPlan → TreeNode → TreePatternBits
  164. def treeString(append: (String) => Unit, verbose: Boolean, addSuffix: Boolean, maxFields: Int, printOperatorId: Boolean): Unit
    Definition Classes
    TreeNode
  165. final def treeString(verbose: Boolean, addSuffix: Boolean, maxFields: Int, printOperatorId: Boolean): String
    Definition Classes
    TreeNode
  166. final def treeString: String
    Definition Classes
    TreeNode
  167. def unsetTagValue[T](tag: TreeNodeTag[T]): Unit
    Definition Classes
    TreeNode
  168. def updateOuterReferencesInSubquery(plan: SparkPlan, attrMap: AttributeMap[Attribute]): SparkPlan
    Attributes
    protected
    Definition Classes
    QueryPlan
  169. def vectorTypes: Option[Seq[String]]
    Definition Classes
    SparkPlan
  170. def verboseString(maxFields: Int): String
    Definition Classes
    QueryPlan → TreeNode
  171. def verboseStringWithOperatorId(): String
    Definition Classes
    QueryPlan
  172. def verboseStringWithSuffix(maxFields: Int): String
    Definition Classes
    TreeNode
  173. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  174. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  175. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  176. def waitForSubqueries(): Unit
    Attributes
    protected
    Definition Classes
    SparkPlan
  177. final def withNewChildren(newChildren: Seq[SparkPlan]): SparkPlan
    Definition Classes
    TreeNode
  178. def withNewChildrenInternal(newLeft: SparkPlan, newRight: SparkPlan): SparkPlan
    Attributes
    protected
    Definition Classes
    DistanceJoinExecSedonaBinaryExecNode
  179. final def withNewChildrenInternal(newChildren: IndexedSeq[SparkPlan]): SparkPlan
    Definition Classes
    SedonaBinaryExecNode → TreeNode

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