opensearch-project / sql

Query your data using familiar SQL or intuitive Piped Processing Language (PPL)
https://opensearch.org/docs/latest/search-plugins/sql/index/
Apache License 2.0
120 stars 139 forks source link

[FEATURE] Support Well-Known Text Geoshape #1432

Open RobSaxonNokia opened 1 year ago

RobSaxonNokia commented 1 year ago

Is your feature request related to a problem? The documentation shows that geopoint may be in many formats. One such format I used is WKT [Well-Known Text]. This is currently in use for my project. However, when I tried to use the Observability features, an error message was generated stating my geopoint was not valid and only the format "{ "lat": number, "lon": number }" is supported.

What solution would you like? Support WKT and other valid formats for geo points / geo shapes.

What alternatives have you considered? I would need to redo my design to change all WKT uses to the one format supported.

Do you have any additional context? Overall, if possible, have a consistence use of fields like geo-shape. Screenshot 2023-03-07 075206

joshuali925 commented 1 year ago

i believe the problem is lack of support of WKT in sql/ppl engine, i'll move the issue there

dai-chen commented 1 year ago

@RobSaxonNokia We may need to cover different common format in https://github.com/opensearch-project/sql/blob/main/opensearch/src/main/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprGeoPointValue.java. We will look into this issue. Thanks!

dai-chen commented 1 year ago

Examples: https://opensearch.org/docs/2.6/field-types/geo-point/