pub fn parse_distance_predicate(
expr: &Arc<dyn PhysicalExpr>,
) -> Option<ParsedDistancePredicate>Expand description
Parses a physical expression to extract distance predicate components.
This function recognizes and parses distance predicates in spatial queries.
See ParsedDistancePredicate documentation for details on the supported
distance predicate forms.
§Arguments
expr- A physical expression that potentially represents a distance predicate
§Returns
Some(ParsedDistancePredicate)- If the expression is a recognized distance predicate, returns the parsed components (two geometry arguments and the distance threshold)None- If the expression is not a distance predicate or cannot be parsed
§Examples
The function can parse expressions like:
st_dwithin(geometry_column, POINT(0 0), 100.0)st_distance(geom_a, geom_b) <= 50.025.0 >= st_distance(geom_x, geom_y)