Skip to content

GEO_CONTAINS() incorrect evaluation in 3.11.2, correct in 3.9.3 #216

Closed
@dbenesj

Description

@dbenesj

My Environment

  • ArangoDB Version: 3.11.2
  • Deployment Mode: Single Server
  • Deployment Strategy: Manual Start in Docker
  • Configuration: all defaults
  • Infrastructure: own
  • Total RAM in your machine: 16GB
  • Disks in use: HDD
  • Used Package: Docker - official Docker library

Component, Query & Data

Affected feature:
AQL query using web interface, GEO_CONTAINS() function

AQL query (if applicable):

let polygon = GEO_POLYGON([
		[19, 47], [16, 47], [16, 49], [19, 49], [19, 47]
])
let point = [18, 48]
// does not matter whether point is defined this way or any other way
// let point = GEO_POINT(18, 48)
// let point = {'type': 'Point','coordinates': [18, 48]}
return GEO_CONTAINS(polygon, point)

AQL explain and/or profile (if applicable):

Query String (138 chars, cacheable: true):
 let polygon = GEO_POLYGON([
 		[19, 47], [16, 47], [16, 49], [19, 49], [19, 47]
 ])
 let point = [18, 48]
 return GEO_CONTAINS(polygon, point)

Execution plan:
 Id   NodeType          Est.   Comment
  1   SingletonNode        1   * ROOT
  4   CalculationNode      1     - LET arangodb/arangodb#2 = false   /* json expression */   /* const assignment */
  5   ReturnNode           1     - RETURN arangodb/arangodb#2

Indexes used:
 none

Optimization rules applied:
 Id   RuleName
  1   move-calculations-up
  2   remove-unnecessary-calculations

Query Statistics:
 Writes Exec   Writes Ign   Scan Full   Scan Index   Cache Hits/Misses   Filtered   Peak Mem [b]   Exec Time [s]
           0            0           0            0               0 / 0          0              0         0.00054

Query Profile:
 Query Stage               Duration [s]
 initializing                   0.00000
 parsing                        0.00006
 optimizing ast                 0.00016
 loading collections            0.00001
 instantiating plan             0.00004
 optimizing plan                0.00019
 instantiating executors        0.00004
 executing                      0.00004
 finalizing                     0.00003

Dataset:
no need for the dataset, just what is provided in AQL is enough

Steps to reproduce

just execute provided AQL

Problem:
this AQL evaluetes to false in 3.11.2, but to true in 3.9.3
3.9.3 behavior is correct in my opinion

Expected result:
should return true also in 3.11.2 version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions