pub struct ParsedDistancePredicate {
pub arg0: Arc<dyn PhysicalExpr>,
pub arg1: Arc<dyn PhysicalExpr>,
pub arg_distance: Arc<dyn PhysicalExpr>,
}Expand description
Represents a parsed distance predicate with its constituent parts.
Distance predicates are spatial operations that determine whether two geometries are within a specified distance of each other. This struct holds the parsed components of such predicates for further processing.
§Supported Distance Predicate Forms
This struct can represent the parsed components from any of these distance predicate forms:
-
Direct distance function:
st_dwithin(geom1, geom2, distance)- Returns true if geometries are within the distance
-
Distance comparison (left-to-right):
st_distance(geom1, geom2) <= distance- Distance is less than or equal to thresholdst_distance(geom1, geom2) < distance- Distance is strictly less than threshold
-
Distance comparison (right-to-left):
distance >= st_distance(geom1, geom2)- Threshold is greater than or equal to distancedistance > st_distance(geom1, geom2)- Threshold is strictly greater than distance
All forms are logically equivalent but may appear differently in SQL queries. The parser normalizes them into this common structure for uniform processing.
Fields§
§arg0: Arc<dyn PhysicalExpr>The first geometry argument in the distance predicate
arg1: Arc<dyn PhysicalExpr>The second geometry argument in the distance predicate
arg_distance: Arc<dyn PhysicalExpr>The distance threshold argument (as a physical expression)
Auto Trait Implementations§
impl Freeze for ParsedDistancePredicate
impl !RefUnwindSafe for ParsedDistancePredicate
impl Send for ParsedDistancePredicate
impl Sync for ParsedDistancePredicate
impl Unpin for ParsedDistancePredicate
impl UnsafeUnpin for ParsedDistancePredicate
impl !UnwindSafe for ParsedDistancePredicate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more