jiayuasu commented on code in PR #610: URL: https://github.com/apache/incubator-sedona/pull/610#discussion_r851720081
########## sql/src/main/scala/org/apache/spark/sql/sedona_sql/strategy/join/JoinQueryDetector.scala: ########## @@ -69,6 +69,8 @@ class JoinQueryDetector(sparkSession: SparkSession) extends Strategy { Some(JoinQueryDetection(left, right, leftShape, rightShape, false, extraCondition)) case ST_Crosses(Seq(leftShape, rightShape)) => Some(JoinQueryDetection(right, left, rightShape, leftShape, false, extraCondition)) + case ST_Disjoint(Seq(leftShape, rightShape)) => + Some(JoinQueryDetection(left, right, leftShape, rightShape, false, extraCondition)) case _ => None Review Comment: Please do NOT make any change to this file because ST_Disjoint-based join in Spark cannot be optimized bySedona. ########## flink/src/main/java/org/apache/sedona/flink/expressions/Predicates.java: ########## @@ -104,4 +104,28 @@ public Boolean eval(@DataTypeHint("INT") Integer key, @DataTypeHint(value = "RAW return JudgementHelper.match(geom1, geom2, halfOpenRectangle, false); } } + + public static class ST_Disjoint extends ScalarFunction { + private List<Envelope> grids; + + /** + * Constructor for duplicate removal + */ + public ST_Disjoint(PartitioningUtils partitioner) { + grids = partitioner.fetchLeafZones(); + } + + /** + * Constructor for relation checking without duplicate removal + */ + public ST_Disjoint() { + } + + @DataTypeHint("Boolean") + public Boolean eval(@DataTypeHint(value = "RAW", bridgedTo = org.locationtech.jts.geom.Geometry.class) Object o1, @DataTypeHint(value = "RAW", bridgedTo = org.locationtech.jts.geom.Geometry.class) Object o2) { + Geometry geom1 = (Geometry) o1; Review Comment: Please also add a test to Flink. Thanks! -- 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: dev-unsubscr...@sedona.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org