SQL: Add support for shape type (#46464)

Enables support for Cartesian geometries shape type. We still need to
decide how to handle the distance function since it is currently using
the haversine distance formula and returns results in meters, which
doesn't make any sense for Cartesian geometries.

Closes #46412
Relates to #43644
This commit is contained in:
Igor Motov 2019-09-25 13:43:05 -04:00 committed by GitHub
parent b42923f339
commit 76de93c258
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 146 additions and 114 deletions

View file

@ -5,14 +5,15 @@
beta[]
The geo functions work with geometries stored in `geo_point` and `geo_shape` fields, or returned by other geo functions.
The geo functions work with geometries stored in `geo_point`, `geo_shape` and `shape` fields, or returned by other geo functions.
==== Limitations
Both <<geo-point, `geo_point`>> and <<geo-shape, `geo_shape`>> types are represented in SQL as geometry and can be used
interchangeably with the following exceptions:
<<geo-point, `geo_point`>>, <<geo-shape, `geo_shape`>> and <<shape, `shape`>> and types are represented in SQL as
geometry and can be used interchangeably with the following exceptions:
* `geo_shape` fields don't have doc values, therefore these fields cannot be used for filtering, grouping or sorting.
* `geo_shape` and `shape` fields don't have doc values, therefore these fields cannot be used for filtering, grouping
or sorting.
* `geo_points` fields are indexed and have doc values by default, however only latitude and longitude are stored and
indexed with some loss of precision from the original values (4.190951585769653E-8 for the latitude and