Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ST_Contains, ST_Intersects, ST_Distance, etc. on geometry collections fail with NPE #10628

Closed
mbasmanova opened this issue May 17, 2018 · 1 comment

Comments

@mbasmanova
Copy link
Contributor

All of the relationship tests functions fail with NPE when input is a geometry collection.

The following functions are affected: ST_Contains, ST_Crosses, ST_Disjoint, ST_Equals, ST_Intersects, ST_Overlaps, ST_Touches and ST_Within.

presto> select ST_Contains(ST_GeometryFromText('GEOMETRYCOLLECTION (POINT (1 2), LINESTRING (8 4, 5 7))'), ST_Point(1, 2));

java.lang.NullPointerException
	at com.esri.core.geometry.RelationalOperations.relate(RelationalOperations.java:44)
	at com.esri.core.geometry.OperatorContainsLocal.execute(OperatorContainsLocal.java:31)
	at com.esri.core.geometry.GeometryEngine.contains(GeometryEngine.java:479)
	at com.esri.core.geometry.ogc.OGCGeometry.contains(OGCGeometry.java:305)
	at com.facebook.presto.plugin.geospatial.GeoFunctions.stContains(GeoFunctions.java:743)

See Esri/geometry-api-java#176 for the issue in the underlying library.

tdcmeehan added a commit to tdcmeehan/presto that referenced this issue Aug 1, 2018
Upgrading the Esri geometry library unblocks the fix for prestodb#10628, and adds support for geometry collections to multiple operations.
mbasmanova pushed a commit that referenced this issue Aug 3, 2018
Upgrading the Esri geometry library unblocks the fix for #10628, and adds support for geometry collections to multiple operations.
@mbasmanova
Copy link
Contributor Author

Fixed by #11157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant