package join
- Alphabetic
- Public
- Protected
Type Members
- case class BroadcastIndexJoinExec(left: SparkPlan, right: SparkPlan, streamShape: Expression, indexBuildSide: JoinSide, windowJoinSide: JoinSide, spatialPredicate: SpatialPredicate, extraCondition: Option[Expression] = None, distance: Option[Expression] = None) extends SparkPlan with SedonaBinaryExecNode with TraitJoinQueryBase with Logging with Product with Serializable
- 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.
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
- case class JoinQueryDetection(left: LogicalPlan, right: LogicalPlan, leftShape: Expression, rightShape: Expression, spatialPredicate: SpatialPredicate, extraCondition: Option[Expression] = None, distance: Option[Expression] = None) extends Product with Serializable
- class JoinQueryDetector extends Strategy
Plans
RangeJoinExecfor inner joins on spatial relationships ST_Contains(a, b) and ST_Intersects(a, b).Plans
RangeJoinExecfor inner joins on spatial relationships ST_Contains(a, b) and ST_Intersects(a, b).Plans
DistanceJoinExecfor inner joins on spatial relationship ST_Distance(a, b) < r.Plans
BroadcastIndexJoinExecfor inner joins on spatial relationships with a broadcast hint. - sealed trait JoinSide extends AnyRef
- case class RangeJoinExec(left: SparkPlan, right: SparkPlan, leftShape: Expression, rightShape: Expression, swappedLeftAndRight: Boolean, spatialPredicate: SpatialPredicate, extraCondition: Option[Expression] = None) extends SparkPlan with SedonaBinaryExecNode with TraitJoinQueryExec with Logging with Product with Serializable
ST_Contains(left, right) - left contains right or ST_Intersects(left, right) - left and right intersect
ST_Contains(left, right) - left contains right or ST_Intersects(left, right) - left and right intersect
- 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
- spatialPredicate
spatial predicate as join condition
- extraCondition
extra join condition other than spatialPredicate
- case class SpatialIndexExec(child: SparkPlan, shape: Expression, indexType: IndexType, distance: Option[Expression] = None) extends SparkPlan with SedonaUnaryExecNode with TraitJoinQueryBase with Logging with Product with Serializable
- trait TraitJoinQueryBase extends AnyRef
- trait TraitJoinQueryExec extends TraitJoinQueryBase