[
https://issues.apache.org/jira/browse/IMPALA-15193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18100739#comment-18100739
]
ASF subversion and git services commented on IMPALA-15193:
----------------------------------------------------------
Commit f0d6958ff10de4a526e5b28b9b6411d452d5a17b in impala's branch
refs/heads/master from jasonmfehr
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=f0d6958ff ]
IMPALA-15193: [addendum] ST_Disjoint Incorrect Results Workaround
Workaround of a bug in the ST_Disjoint built-in UDF caused by a bug
in the underpinning esri-geometry-api library. When comparing two
geometries to determine if they are disjoint where the first
geometry is either a LineString or a MultiLineString and the second
geometry is a MultiLineString, then ST_Disjoint incorrectly returns
false when the first geometry is within the envelope of the second.
The first patch for this issue fixed the ST_Intersects function.
Since the underlying bug is in the disjoint predicate implementation
of the esri-geometry-api library, the workaround must also be
applied to the ST_Disjoint function implementation.
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: I66c23c6db1140add91d86dbaeaec9884bcb6a831
Reviewed-on: http://gerrit.cloudera.org:8080/24648
Reviewed-by: Csaba Ringhofer <[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]