Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2.1
-
None
Description
Consider the following example:
var polygonDf1 = sparkSession.sql("select ST_GeomFromWKT('POLYGON ((0 0, 10 10, 10 0, 0 0))') as p1") polygonDf1.createOrReplaceTempView("polygondf1") var polygonDf2 = sparkSession.sql("select ST_GeomFromWKT('POLYGON ((0 0, 1 1, 1 0, 0 0))') as p2") polygonDf2.createOrReplaceTempView("polygondf2") var rangeJoinDf = sparkSession.sql("select * from polygondf1, polygondf2 where ST_Touches(polygondf1.p1,polygondf2.p2) ")
The correct result should be empty, but SEDONA returns a result.
In case of a spatial filter, the correct result is returned. That is, if we replace the last query with:
select * from polygondf1 where ST_Touches(polygondf1.p1,ST_GeomFromWKT('POLYGON ((0 0, 1 1, 1 0, 0 0))'))
Then, the result is indeed empty.
I have checked that JTS version 1.18.2 returns the correct answer, so the problem must be somewhere else.
Attachments
Issue Links
- is fixed by
-
SEDONA-177 Support spatial predicates other than INTERSECTS and COVERS/COVERED_BY in RangeQuery.SpatialRangeQuery and JoinQuery.SpatialJoinQuery
- Resolved