Skip to content

Commit d88df95

Browse files
committed
simpler
Signed-off-by: Robert Kruszewski <github@robertk.io>
1 parent bbc73d8 commit d88df95

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎vortex-spatial/src/prune/distance.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl StatsRewriteRule for SpatialDistancePrune {
7777
return Ok(None);
7878
}
7979

80-
let Some((geom, constant)) = geometry_and_constant(distance, ctx)? else {
80+
let Some((geom, constant)) = geometry_and_constant(distance)? else {
8181
return Ok(None);
8282
};
8383
let Some(query) = query_aabb(constant, ctx)? else {

‎vortex-spatial/src/prune/intersects.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl StatsRewriteRule for SpatialIntersectsPrune {
3737
expr: &BoundExpression,
3838
ctx: &StatsRewriteCtx<'_>,
3939
) -> VortexResult<Option<BoundExpression>> {
40-
let Some((geom, constant)) = geometry_and_constant(expr, ctx)? else {
40+
let Some((geom, constant)) = geometry_and_constant(expr)? else {
4141
return Ok(None);
4242
};
4343
let Some(query) = query_aabb(constant, ctx)? else {

‎vortex-spatial/src/prune/mod.rs‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ use crate::extension::single_geometry;
5151
/// shape (in either operand order), or the column's dtype carries no [`GeometryAabb`] statistic.
5252
/// An asymmetric predicate (e.g. a future contains) must recover which operand is the column
5353
/// itself instead of calling this.
54-
fn geometry_and_constant<'a>(
55-
expr: &'a BoundExpression,
56-
ctx: &StatsRewriteCtx<'_>,
57-
) -> VortexResult<Option<(&'a BoundExpression, &'a Scalar)>> {
54+
fn geometry_and_constant(
55+
expr: &BoundExpression,
56+
) -> VortexResult<Option<(&BoundExpression, &Scalar)>> {
5857
// The predicate is symmetric, so the column (scope root) and the constant may be on either
5958
// side.
6059
let (lhs, rhs) = (expr.child(0), expr.child(1));

0 commit comments

Comments
 (0)