You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "zhangfengcdt (via GitHub)" <gi...@apache.org> on 2026/04/22 17:09:48 UTC

[PR] [GH-2830] Adds Geography dual-dispatch to ST_Intersects [sedona]

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

   ## 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?
   
   - Yes, and the PR name follows the format `[GH-XXX] my subject`. Closes #<issue_number>
   
   ## What changes were proposed in this PR?
     - Adds Geography dual-dispatch to ST_Intersects — spherical intersection via S2 boolean operations for Geography inputs; Geometry path unchanged.
     - Follow-up to #2831; L3 tier. ST_Intersects in Predicates.scala is converted from ST_Predicate with CodegenFallback to InferredExpression(Predicates.intersects, geography.Functions.intersects).
     - JoinQueryDetector: moves ST_Intersects out of getJoinDetection and adds a top-level case with the isGeographyInput guard, mirroring the ST_Contains / ST_Equals treatment. Geometry-path join planning preserved; Geography inputs fall back to row-by-row evaluation.
   
   ## How was this patch tested?
     - mvn clean test -pl common -am -Dtest=FunctionTest
     - New Spark SQL cases in GeographyFunctionTest 
     - mvn spotless:apply run before commit; no format violations.
   
   ## Did this PR include necessary documentation updates?
   
   - Yes, I have updated the documentation.
   


-- 
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] [GH-2830] Adds Geography dual-dispatch to ST_Intersects [sedona]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2856:
URL: https://github.com/apache/sedona/pull/2856#discussion_r3125692858


##########
docs/api/sql/geography/Geography-Functions.md:
##########
@@ -46,3 +46,4 @@ These functions operate on geography type objects.
 | [ST_NPoints](Geography-Functions/ST_NPoints.md) | Integer | Return the number of points (vertices) in a geography. | v1.9.0 |
 | [ST_Distance](Geography-Functions/ST_Distance.md) | Double | Return the minimum geodesic distance between two geographies in meters. | v1.9.0 |
 | [ST_Contains](Geography-Functions/ST_Contains.md) | Boolean | Test whether geography A fully contains geography B. | v1.9.0 |

Review Comment:
   The “Since” versions in this table look inconsistent with the individual geography function pages (e.g., ST_NPoints/ST_Distance/ST_Contains pages show v1.9.1). Please reconcile the versions in the table (and confirm the correct release version for ST_Intersects) so users don’t get conflicting information.
   ```suggestion
   | [ST_NPoints](Geography-Functions/ST_NPoints.md) | Integer | Return the number of points (vertices) in a geography. | v1.9.1 |
   | [ST_Distance](Geography-Functions/ST_Distance.md) | Double | Return the minimum geodesic distance between two geographies in meters. | v1.9.1 |
   | [ST_Contains](Geography-Functions/ST_Contains.md) | Boolean | Test whether geography A fully contains geography B. | v1.9.1 |
   ```



-- 
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] [GH-2830] Adds Geography dual-dispatch to ST_Intersects [sedona]

Posted by "zhangfengcdt (via GitHub)" <gi...@apache.org>.
zhangfengcdt commented on code in PR #2856:
URL: https://github.com/apache/sedona/pull/2856#discussion_r3164506813


##########
docs/api/sql/geography/Geography-Functions/ST_Intersects.md:
##########
@@ -0,0 +1,45 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+# ST_Intersects

Review Comment:
   Sure, I have added the diagram and also conflicts are resolved now.



-- 
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] [GH-2830] Adds Geography dual-dispatch to ST_Intersects [sedona]

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


-- 
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] [GH-2830] Adds Geography dual-dispatch to ST_Intersects [sedona]

Posted by "jiayuasu (via GitHub)" <gi...@apache.org>.
jiayuasu commented on code in PR #2856:
URL: https://github.com/apache/sedona/pull/2856#discussion_r3164229590


##########
docs/api/sql/geography/Geography-Functions/ST_Intersects.md:
##########
@@ -0,0 +1,45 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
+
+# ST_Intersects

Review Comment:
   Can you add some SVG visuals?



-- 
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