From deaabc2ca526308dd07152455a8f2a8940258f90 Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Fri, 25 Oct 2024 14:35:39 -0700 Subject: [PATCH] Update GeometryOpsFlexiJoinsExt.jl --- ext/GeometryOpsFlexiJoinsExt/GeometryOpsFlexiJoinsExt.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/GeometryOpsFlexiJoinsExt/GeometryOpsFlexiJoinsExt.jl b/ext/GeometryOpsFlexiJoinsExt/GeometryOpsFlexiJoinsExt.jl index 165a52495..4c7011e7f 100644 --- a/ext/GeometryOpsFlexiJoinsExt/GeometryOpsFlexiJoinsExt.jl +++ b/ext/GeometryOpsFlexiJoinsExt/GeometryOpsFlexiJoinsExt.jl @@ -28,9 +28,12 @@ FlexiJoins.supports_mode(::FlexiJoins.Mode.Tree, ::FlexiJoins.ByPred{F}, datas) FlexiJoins.prepare_for_join(::FlexiJoins.Mode.Tree, X, cond::FlexiJoins.ByPred{<: GO_DE9IM_FUNCS}) = (X, SortTileRecursiveTree.STRtree(map(cond.Rf, X))) function FlexiJoins.findmatchix(::FlexiJoins.Mode.Tree, cond::FlexiJoins.ByPred{F}, ix_a, a, (B, tree)::Tuple, multi::typeof(identity)) where F <: GO_DE9IM_FUNCS + # Implementation note: + # here, `a` is a row, and `b` is the full table. + # We extract the relevant columns using cond.Lf and cond.Rf. idxs = SortTileRecursiveTree.query(tree, cond.Lf(a)) intersecting_idxs = filter!(idxs) do idx - cond.pred(a, cond.Rf(B[idx])) + cond.pred(cond.Lf(a), cond.Rf(B[idx])) end return intersecting_idxs end