case class DistanceJoinExec(left: SparkPlan, right: SparkPlan, leftShape: Expression, rightShape: Expression, distance: Expression, distanceBoundToLeft: Boolean, spatialPredicate: SpatialPredicate, isGeography: Boolean, 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
- distance
- ST_Distance(left, right) <= distance. Distance can be literal or a computation over 'left' or 'right'.
- distanceBoundToLeft
whether distance expression references attributes from left relation or right relation
- spatialPredicate
spatial predicate as join condition
- extraCondition
extra join condition other than spatialPredicate
- Alphabetic
- By Inheritance
- DistanceJoinExec
- TraitJoinQueryExec
- TraitJoinQueryBase
- SedonaBinaryExecNode
- SparkPlan
- Serializable
- Logging
- QueryPlan
- SQLConfHelper
- TreeNode
- TreePatternBits
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new DistanceJoinExec(left: SparkPlan, right: SparkPlan, leftShape: Expression, rightShape: Expression, distance: Expression, distanceBoundToLeft: Boolean, spatialPredicate: SpatialPredicate, isGeography: Boolean, 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
- distance
- ST_Distance(left, right) <= distance. Distance can be literal or a computation over 'left' or 'right'.
- distanceBoundToLeft
whether distance expression references attributes from left relation or right relation
- spatialPredicate
spatial predicate as join condition
- extraCondition
extra join condition other than spatialPredicate
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- lazy val allAttributes: AttributeSeq
- Definition Classes
- QueryPlan
- def apply(number: Int): TreeNode[_]
- Definition Classes
- TreeNode
- def argString(maxFields: Int): String
- Definition Classes
- TreeNode
- def asCode: String
- Definition Classes
- TreeNode
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final lazy val canonicalized: SparkPlan
- Definition Classes
- QueryPlan
- Annotations
- @transient()
- final def children: Seq[SparkPlan]
- Definition Classes
- SedonaBinaryExecNode → TreeNode
- def cleanupResources(): Unit
- Attributes
- protected[sql]
- Definition Classes
- SparkPlan
- def clone(): SparkPlan
- Definition Classes
- TreeNode → AnyRef
- def collect[B](pf: PartialFunction[SparkPlan, B]): Seq[B]
- Definition Classes
- TreeNode
- def collectFirst[B](pf: PartialFunction[SparkPlan, B]): Option[B]
- Definition Classes
- TreeNode
- def collectLeaves(): Seq[SparkPlan]
- Definition Classes
- TreeNode
- def collectWithSubqueries[B](f: PartialFunction[SparkPlan, B]): Seq[B]
- Definition Classes
- QueryPlan
- def conf: SQLConf
- Definition Classes
- SparkPlan → SQLConfHelper
- final def containsAllPatterns(patterns: TreePattern*): Boolean
- Definition Classes
- TreePatternBits
- final def containsAnyPattern(patterns: TreePattern*): Boolean
- Definition Classes
- TreePatternBits
- lazy val containsChild: Set[TreeNode[_]]
- Definition Classes
- TreeNode
- final def containsPattern(t: TreePattern): Boolean
- Definition Classes
- TreePatternBits
- Annotations
- @inline()
- def copyTagsFrom(other: SparkPlan): Unit
- Definition Classes
- TreeNode
- lazy val deterministic: Boolean
- Definition Classes
- QueryPlan
- val distance: Expression
- val distanceBoundToLeft: Boolean
- def doCanonicalize(): SparkPlan
- Attributes
- protected
- Definition Classes
- QueryPlan
- def doExecute(): RDD[InternalRow]
- Attributes
- protected
- Definition Classes
- TraitJoinQueryExec
- def doExecuteBroadcast[T](): Broadcast[T]
- Attributes
- protected[sql]
- Definition Classes
- SparkPlan
- def doExecuteColumnar(): RDD[ColumnarBatch]
- Attributes
- protected
- Definition Classes
- SparkPlan
- def doPrepare(): Unit
- Attributes
- protected
- Definition Classes
- SparkPlan
- def doSpatialPartitioning(dominantShapes: SpatialRDD[Geometry], followerShapes: SpatialRDD[Geometry], numPartitions: Integer, sedonaConf: SedonaConf): Unit
- Definition Classes
- TraitJoinQueryBase
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def execute(): RDD[InternalRow]
- Definition Classes
- SparkPlan
- final def executeBroadcast[T](): Broadcast[T]
- Definition Classes
- SparkPlan
- def executeCollect(): Array[InternalRow]
- Definition Classes
- SparkPlan
- def executeCollectPublic(): Array[Row]
- Definition Classes
- SparkPlan
- final def executeColumnar(): RDD[ColumnarBatch]
- Definition Classes
- SparkPlan
- final def executeQuery[T](query: => T): T
- Attributes
- protected
- Definition Classes
- SparkPlan
- def executeTail(n: Int): Array[InternalRow]
- Definition Classes
- SparkPlan
- def executeTake(n: Int): Array[InternalRow]
- Definition Classes
- SparkPlan
- def executeToIterator(): Iterator[InternalRow]
- Definition Classes
- SparkPlan
- def exists(f: (SparkPlan) => Boolean): Boolean
- Definition Classes
- TreeNode
- final def expressions: Seq[Expression]
- Definition Classes
- QueryPlan
- val extraCondition: Option[Expression]
- Definition Classes
- DistanceJoinExec → TraitJoinQueryExec
- def fastEquals(other: TreeNode[_]): Boolean
- Definition Classes
- TreeNode
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def find(f: (SparkPlan) => Boolean): Option[SparkPlan]
- Definition Classes
- TreeNode
- def flatMap[A](f: (SparkPlan) => TraversableOnce[A]): Seq[A]
- Definition Classes
- TreeNode
- def foreach(f: (SparkPlan) => Unit): Unit
- Definition Classes
- TreeNode
- def foreachUp(f: (SparkPlan) => Unit): Unit
- Definition Classes
- TreeNode
- def formattedNodeName: String
- Attributes
- protected
- Definition Classes
- QueryPlan
- 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDefaultTreePatternBits: BitSet
- Attributes
- protected
- Definition Classes
- TreeNode
- def getTagValue[T](tag: TreeNodeTag[T]): Option[T]
- Definition Classes
- TreeNode
- def hashCode(): Int
- Definition Classes
- TreeNode → AnyRef → Any
- val id: Int
- Definition Classes
- SparkPlan
- def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def innerChildren: Seq[QueryPlan[_]]
- Definition Classes
- QueryPlan → TreeNode
- def inputSet: AttributeSet
- Definition Classes
- QueryPlan
- def isCanonicalizedPlan: Boolean
- Attributes
- protected
- Definition Classes
- QueryPlan
- val isGeography: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isRuleIneffective(ruleId: RuleId): Boolean
- Attributes
- protected
- Definition Classes
- TreeNode
- def isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def joinPartitionNumOptimizer(dominantSidePartNum: Int, followerSidePartNum: Int, dominantSideCount: Long): Int
- Definition Classes
- TraitJoinQueryExec
- def jsonFields: List[JField]
- Attributes
- protected
- Definition Classes
- TreeNode
- val left: SparkPlan
- Definition Classes
- DistanceJoinExec → TraitJoinQueryExec → SedonaBinaryExecNode
- val leftShape: Expression
- Definition Classes
- DistanceJoinExec → TraitJoinQueryExec
- final def legacyWithNewChildren(newChildren: Seq[SparkPlan]): SparkPlan
- Attributes
- protected
- Definition Classes
- TreeNode
- def log: Logger
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logName: String
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logicalLink: Option[LogicalPlan]
- Definition Classes
- SparkPlan
- def longMetric(name: String): SQLMetric
- Definition Classes
- SparkPlan
- def makeCopy(newArgs: Array[AnyRef]): SparkPlan
- Definition Classes
- SparkPlan → TreeNode
- def map[A](f: (SparkPlan) => A): Seq[A]
- Definition Classes
- TreeNode
- def mapChildren(f: (SparkPlan) => SparkPlan): SparkPlan
- Definition Classes
- TreeNode
- def mapExpressions(f: (Expression) => Expression): DistanceJoinExec.this.type
- Definition Classes
- QueryPlan
- def mapProductIterator[B](f: (Any) => B)(implicit arg0: ClassTag[B]): Array[B]
- Attributes
- protected
- Definition Classes
- TreeNode
- def markRuleAsIneffective(ruleId: RuleId): Unit
- Attributes
- protected
- Definition Classes
- TreeNode
- def metrics: Map[String, SQLMetric]
- Definition Classes
- SparkPlan
- final def missingInput: AttributeSet
- Definition Classes
- QueryPlan
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nodeName: String
- Definition Classes
- TreeNode
- val nodePatterns: Seq[TreePattern]
- Attributes
- protected
- Definition Classes
- TreeNode
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def numberedTreeString: String
- Definition Classes
- TreeNode
- val origin: Origin
- Definition Classes
- TreeNode
- def otherCopyArgs: Seq[AnyRef]
- Attributes
- protected
- Definition Classes
- TreeNode
- def output: Seq[Attribute]
- Definition Classes
- TraitJoinQueryExec
- def outputOrdering: Seq[SortOrder]
- Definition Classes
- SparkPlan
- def outputPartitioning: Partitioning
- Definition Classes
- SparkPlan
- lazy val outputSet: AttributeSet
- Definition Classes
- QueryPlan
- Annotations
- @transient()
- def p(number: Int): SparkPlan
- Definition Classes
- TreeNode
- final def prepare(): Unit
- Definition Classes
- SparkPlan
- def prepareSubqueries(): Unit
- Attributes
- protected
- Definition Classes
- SparkPlan
- def prettyJson: String
- Definition Classes
- TreeNode
- def printSchema(): Unit
- Definition Classes
- QueryPlan
- def producedAttributes: AttributeSet
- Definition Classes
- QueryPlan
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- lazy val references: AttributeSet
- Definition Classes
- QueryPlan
- Annotations
- @transient()
- def requiredChildDistribution: Seq[Distribution]
- Definition Classes
- SparkPlan
- def requiredChildOrdering: Seq[Seq[SortOrder]]
- Definition Classes
- SparkPlan
- def resetMetrics(): Unit
- Definition Classes
- SparkPlan
- def rewriteAttrs(attrMap: AttributeMap[Attribute]): SparkPlan
- Definition Classes
- QueryPlan
- val right: SparkPlan
- Definition Classes
- DistanceJoinExec → TraitJoinQueryExec → SedonaBinaryExecNode
- val rightShape: Expression
- Definition Classes
- DistanceJoinExec → TraitJoinQueryExec
- final def sameResult(other: SparkPlan): Boolean
- Definition Classes
- QueryPlan
- lazy val schema: StructType
- Definition Classes
- QueryPlan
- def schemaString: String
- Definition Classes
- QueryPlan
- final def semanticHash(): Int
- Definition Classes
- QueryPlan
- final val session: SparkSession
- Definition Classes
- SparkPlan
- def setLogicalLink(logicalPlan: LogicalPlan): Unit
- Definition Classes
- SparkPlan
- def setTagValue[T](tag: TreeNodeTag[T], value: T): Unit
- Definition Classes
- TreeNode
- def simpleString(maxFields: Int): String
- Definition Classes
- QueryPlan → TreeNode
- def simpleStringWithNodeId(): String
- Definition Classes
- QueryPlan → TreeNode
- def sparkContext: SparkContext
- Attributes
- protected
- Definition Classes
- SparkPlan
- val spatialPredicate: SpatialPredicate
- Definition Classes
- DistanceJoinExec → TraitJoinQueryExec
- def statePrefix: String
- Attributes
- protected
- Definition Classes
- QueryPlan
- def stringArgs: Iterator[Any]
- Attributes
- protected
- Definition Classes
- TreeNode
- lazy val subqueries: Seq[SparkPlan]
- Definition Classes
- QueryPlan
- Annotations
- @transient()
- def subqueriesAll: Seq[SparkPlan]
- Definition Classes
- QueryPlan
- def supportsColumnar: Boolean
- Definition Classes
- SparkPlan
- def supportsRowBased: Boolean
- Definition Classes
- SparkPlan
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toExpandedEnvelopeRDD(rdd: RDD[UnsafeRow], shapeExpression: Expression, boundRadius: Expression, isGeography: Boolean): SpatialRDD[Geometry]
- Definition Classes
- TraitJoinQueryBase
- def toJSON: String
- Definition Classes
- TreeNode
- def toRowBased: SparkPlan
- Definition Classes
- SparkPlan
- def toSpatialRDD(rdd: RDD[UnsafeRow], shapeExpression: Expression): SpatialRDD[Geometry]
- Definition Classes
- TraitJoinQueryBase
- def toSpatialRddPair(leftRdd: RDD[UnsafeRow], leftShapeExpr: Expression, rightRdd: RDD[UnsafeRow], rightShapeExpr: Expression): (SpatialRDD[Geometry], SpatialRDD[Geometry])
- Definition Classes
- DistanceJoinExec → TraitJoinQueryBase
- def toString(): String
- Definition Classes
- TreeNode → AnyRef → Any
- def transform(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
- Definition Classes
- TreeNode
- def transformAllExpressions(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
- Definition Classes
- QueryPlan
- def transformAllExpressionsWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
- Definition Classes
- QueryPlan
- def transformDown(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
- Definition Classes
- TreeNode
- def transformDownWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
- Definition Classes
- TreeNode
- def transformDownWithSubqueries(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
- Definition Classes
- QueryPlan
- def transformDownWithSubqueriesAndPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
- Definition Classes
- QueryPlan
- def transformExpressions(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
- Definition Classes
- QueryPlan
- def transformExpressionsDown(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
- Definition Classes
- QueryPlan
- def transformExpressionsDownWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
- Definition Classes
- QueryPlan
- def transformExpressionsUp(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
- Definition Classes
- QueryPlan
- def transformExpressionsUpWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
- Definition Classes
- QueryPlan
- def transformExpressionsWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[Expression, Expression]): DistanceJoinExec.this.type
- Definition Classes
- QueryPlan
- def transformUp(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
- Definition Classes
- TreeNode
- def transformUpWithBeforeAndAfterRuleOnChildren(cond: (SparkPlan) => Boolean, ruleId: RuleId)(rule: PartialFunction[(SparkPlan, SparkPlan), SparkPlan]): SparkPlan
- Definition Classes
- TreeNode
- def transformUpWithNewOutput(rule: PartialFunction[SparkPlan, (SparkPlan, Seq[(Attribute, Attribute)])], skipCond: (SparkPlan) => Boolean, canGetOutput: (SparkPlan) => Boolean): SparkPlan
- Definition Classes
- QueryPlan
- def transformUpWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
- Definition Classes
- TreeNode
- def transformUpWithSubqueries(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
- Definition Classes
- QueryPlan
- def transformWithPruning(cond: (TreePatternBits) => Boolean, ruleId: RuleId)(rule: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
- Definition Classes
- TreeNode
- def transformWithSubqueries(f: PartialFunction[SparkPlan, SparkPlan]): SparkPlan
- Definition Classes
- QueryPlan
- lazy val treePatternBits: BitSet
- Definition Classes
- QueryPlan → TreeNode → TreePatternBits
- def treeString(append: (String) => Unit, verbose: Boolean, addSuffix: Boolean, maxFields: Int, printOperatorId: Boolean): Unit
- Definition Classes
- TreeNode
- final def treeString(verbose: Boolean, addSuffix: Boolean, maxFields: Int, printOperatorId: Boolean): String
- Definition Classes
- TreeNode
- final def treeString: String
- Definition Classes
- TreeNode
- def unsetTagValue[T](tag: TreeNodeTag[T]): Unit
- Definition Classes
- TreeNode
- def updateOuterReferencesInSubquery(plan: SparkPlan, attrMap: AttributeMap[Attribute]): SparkPlan
- Attributes
- protected
- Definition Classes
- QueryPlan
- def vectorTypes: Option[Seq[String]]
- Definition Classes
- SparkPlan
- def verboseString(maxFields: Int): String
- Definition Classes
- QueryPlan → TreeNode
- def verboseStringWithOperatorId(): String
- Definition Classes
- QueryPlan
- def verboseStringWithSuffix(maxFields: Int): String
- Definition Classes
- TreeNode
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def waitForSubqueries(): Unit
- Attributes
- protected
- Definition Classes
- SparkPlan
- final def withNewChildren(newChildren: Seq[SparkPlan]): SparkPlan
- Definition Classes
- TreeNode
- def withNewChildrenInternal(newLeft: SparkPlan, newRight: SparkPlan): SparkPlan
- Attributes
- protected
- Definition Classes
- DistanceJoinExec → SedonaBinaryExecNode
- final def withNewChildrenInternal(newChildren: IndexedSeq[SparkPlan]): SparkPlan
- Definition Classes
- SedonaBinaryExecNode → TreeNode