You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "alexeyegorov (via GitHub)" <gi...@apache.org> on 2025/12/14 13:26:10 UTC

[PR] [DOCS] Add spatial left join docs solution [sedona]

alexeyegorov opened a new pull request, #2561:
URL: https://github.com/apache/sedona/pull/2561

   ## Did you read the Contributor Guide?
   
   - Yes, I have read the [Contributor Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest/community/develop/)
   
   ## Is this PR related to a ticket?
   
   - No:
     - this is a documentation update. The PR name follows the format `[DOCS] my subject`
   
   ## What changes were proposed in this PR?
   
   ### Major change
   
   This PR adds the documentation based on [the discussion about spatial joins in Sedona](https://github.com/apache/sedona/discussions/2520#discussioncomment-15236503).
   During some experiments, we found a workaround to perform a spatial left join without broadcasting any of the datasets (e.g. due to a size of the datasets).
   
   ### Minor change
   
   There was a minor typo in the documentation of the distance join which is fixed here.
   In case it is not wanted to mix it up, it can be dropped here.
   
   ## How was this patch tested?
   
   
   ## Did this PR include necessary documentation updates?
   
   This PR does not affect any public API.
   It is just updating documentation and suggests a solution to perform a spatial left join.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [DOCS] Add spatial left join docs solution [sedona]

Posted by "alexeyegorov (via GitHub)" <gi...@apache.org>.
alexeyegorov commented on PR #2561:
URL: https://github.com/apache/sedona/pull/2561#issuecomment-3659924616

   > @alexeyegorov The pre-commit still failed.
   
   Sorry, noob mistake! Fixed this now.
   
   > In addition, I think the full outer join and COALESCE is not needed, if the target is a left join from dfa.geom to dfb.geom?
   
   That's a great hint. I have slightly overcomplicated that. I will update the code after few checks again with the data.
   
   Could a suggestion for a DBT macro be helpful here? There is no dedicated DBT documentation in here. 
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [DOCS] Add spatial left join docs solution [sedona]

Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu commented on PR #2561:
URL: https://github.com/apache/sedona/pull/2561#issuecomment-3658070153

   @alexeyegorov The pre-commit still failed.
   
   In addition, I think the full outer join and COALESCE is not needed, if the target is a left join from dfa.geom to dfb.geom?
   
   I think below it is what you need
   
   
   ```
   WITH inner_join AS (
       SELECT
           dfA.a_id,
           dfB.b_id
       FROM dfA, dfB
       WHERE ST_INTERSECTS(dfA.geometry, dfB.geometry)
   )
   SELECT
       dfA.*,
       inner_join.b_id
   FROM dfA
   LEFT JOIN inner_join
   ON dfA.a_id = inner_join.a_id;
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [DOCS] Add spatial left join docs solution [sedona]

Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu commented on PR #2561:
URL: https://github.com/apache/sedona/pull/2561#issuecomment-3652876966

   @alexeyegorov thanks for the PR. Would you please run `pre-commit --all-files` locally to fix the failed CI?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [DOCS] Add spatial left join docs solution [sedona]

Posted by "alexeyegorov (via GitHub)" <gi...@apache.org>.
alexeyegorov commented on PR #2561:
URL: https://github.com/apache/sedona/pull/2561#issuecomment-3654571247

   @jiayuasu Sorry I missed that. Now it is done. 
   
   Hope to get some feedback on the content. :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [DOCS] Add spatial left join docs solution [sedona]

Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu merged PR #2561:
URL: https://github.com/apache/sedona/pull/2561


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org