jiayuasu commented on code in PR #2447:
URL: https://github.com/apache/sedona/pull/2447#discussion_r2462581729
##########
spark/common/src/test/scala/org/apache/sedona/sql/SpatialJoinSuite.scala:
##########
@@ -268,6 +268,15 @@ class SpatialJoinSuite extends TestBaseScala with
TableDrivenPropertyChecks {
assert(resultRows.isEmpty)
}
}
+
+ it("ST_Distance join involving empty geometries should evaluate to false")
{
+ val result1 = sparkSession.sql(
Review Comment:
I agree. This PR just simply changes the behavior of a predicate. The
current tests would suffice. We can keep it this way, and probably you
shouldn't call it spatial join.
I think I am just curious how the current [spatial join
logic](https://jiayuasu.github.io/files/paper/GeoSpark_Geoinformatica_2018.pdf)
(distance join and range join) handles `EMPTY` geometries. Our spatial joins go
through several phases (1) distributed spatial partitioning (if the data is too
large for a broadcast join) (2) spatial index building (3) filtering (4)
predicate eval. IIRC, empty geometries probably get pruned out at Phase 1 or
Phase 2. So the ST_Distance eval bug probably didn't surface before.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]