[
https://issues.apache.org/jira/browse/ASTERIXDB-3067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tomal Majumder updated ASTERIXDB-3067:
--------------------------------------
Summary: NullPointerException thrown while applying spatial predicates on
'GeometryCollection' type geometry object (was: NullPointerException thrown
while applying spatial predicates (st_intersects, st_crosses etc) on
'GeometryCollection' type geometry object)
> NullPointerException thrown while applying spatial predicates on
> 'GeometryCollection' type geometry object
> ----------------------------------------------------------------------------------------------------------
>
> Key: ASTERIXDB-3067
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-3067
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: FUN - Functions
> Affects Versions: 0.9.8
> Reporter: Tomal Majumder
> Priority: Major
>
> It throws *java.lang.NullPointerException* running the following query:
> |DROP DATAVERSE GISTest IF EXISTS;
> CREATE DATAVERSE GISTest;
> USE GISTest;
>
> CREATE TYPE GeometryType AS{
> id : int,
> g : geometry
> };
>
> CREATE DATASET Geometries (GeometryType) PRIMARY KEY id;
> INSERT INTO Geometries ([
> {"id": 1, "g": st_geom_from_text('POINT(40 10)')},
> {"id": 2, "g": st_geom_from_text('GEOMETRYCOLLECTION (POINT (40
> 10),LINESTRING (10 10, 20 20, 10 40),POLYGON ((40 40, 20 45, 45 30, 40
> 40)))')}
> ]);
> USE GISTest;
> SELECT id, st_intersects(g, st_make_point(40, 10)) from Geometries;|
> The result should be:
> { "id": 1, "$1": true }
> { "id": 2, "$1": true }
> Instead the output reports the following exceprtion:
> java.lang.NullPointerException: Cannot invoke
> "com.esri.core.geometry.Geometry.getType()" because "geometry_a" is null
> [HyracksDataException]
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)