Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL: Add support for shape type #46464

Merged
merged 4 commits into from
Sep 25, 2019

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Sep 6, 2019

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

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 elastic#46412
Relates to elastic#43644
@imotov imotov added >enhancement :Analytics/Geo Indexing, search aggregations of geo points and shapes :Analytics/SQL SQL querying v8.0.0 v7.5.0 labels Sep 6, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo

Copy link
Contributor

@matriv matriv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -73,25 +73,25 @@ private static String createOGCIndexRequest() throws Exception {
createString("name", createIndex);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since geo_shape support is still around, it would help to have both geo_shape and shape field types in the same dataset for both testing and example purposes. Unless I'm missing something it looks like all the geo_ fields were renamed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geo_shape and shape are both here to stay, they share pretty much most of the code paths, there is some test duplication between OGC tests and other tests, and shape implementation is much closer to OGC standard. So, I thought it just switching OGC test to shape would make sense and shouldn't reduce overall test coverage and we don't bloat the tests in the process.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@costin does this makes sense, or should I make a copy of the tests for shape?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imotov A full copy is not needed however it would good to have a test that touches on a shape field (even if its just listing or doing a basic query) alongside a geo_shape.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@imotov
Copy link
Contributor Author

imotov commented Sep 25, 2019

@costin could you take another look?

Copy link
Member

@costin costin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@imotov imotov merged commit 76de93c into elastic:master Sep 25, 2019
imotov added a commit that referenced this pull request Sep 26, 2019
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
@imotov imotov deleted the issue-46412-add-support-for-shape branch May 1, 2020 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/Geo Indexing, search aggregations of geo points and shapes :Analytics/SQL SQL querying >enhancement v7.5.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SQL: Add support for shape type
5 participants