[
https://issues.apache.org/jira/browse/IMPALA-15193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100129#comment-18100129
]
ASF subversion and git services commented on IMPALA-15193:
----------------------------------------------------------
Commit 2d76fa47a746b12e6c76abc2670b07a1ce658be7 in impala's branch
refs/heads/master from jasonmfehr
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=2d76fa47a ]
IMPALA-15193: ST_Intersects Incorrect Results Workaround
Workaround of a bug in the ST_Intersects built-in UDF caused by a bug
in the underpinning esri-geometry-api library. This bug results in
true being returned when comparing either a LineString or a
MultiLineString with another MultiLineString. If the first geometry is
within the envelope of the second MutlLineString, then true is
returned even if the two geometries do not actually intersect.
Tested via the addition of new query tests with the test results
double checked in postgis.
Assisted-by: Github Copilot (GPT-5.3-Codex)
Change-Id: I62315574ca7cac2e71f3d301abbc9f0088b6533d
Reviewed-on: http://gerrit.cloudera.org:8080/24601
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> st_intersects incorrect with multlinestring
> -------------------------------------------
>
> Key: IMPALA-15193
> URL: https://issues.apache.org/jira/browse/IMPALA-15193
> Project: IMPALA
> Issue Type: Bug
> Reporter: Jason Fehr
> Assignee: Jason Fehr
> Priority: Critical
>
> select st_intersects(st_geomfromtext('LINESTRING(1 0, 1 1)'),
> st_geomfromtext('MULTILINESTRING((0 0, 0 1), (2 0, 2 1))'));
> The x coordinate is 1 in the linestring, while 0 and 2 own the
> multilinestring, so they obviously don't intersect.
> The query above returns true in Hive.
> Cross checked with postgis, which returns false.
> Discovered this when testing Apache Impala's new c++ implementation that used
> boost::geometry, which also returns false.
> The following query also returns true when it should return false:
> select st_intersects(st_geomfromtext('MULTILINESTRING((2 0, 2 2),(3 0, 3
> 2))'), st_geomfromtext('MULTILINESTRING((0 0, 0 2), (4 0, 4 2))'));
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]