-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support geopoint type #309
Conversation
Codecov Report
@@ Coverage Diff @@
## integ-geopoint #309 +/- ##
====================================================
- Coverage 97.42% 97.42% -0.01%
+ Complexity 4647 4645 -2
====================================================
Files 408 408
Lines 11526 11525 -1
Branches 839 841 +2
====================================================
- Hits 11229 11228 -1
Misses 290 290
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
.../src/test/java/org/opensearch/sql/opensearch/data/value/OpenSearchExprGeoPointValueTest.java
Show resolved
Hide resolved
Tested with: found in https://opensearch.org/docs/2.3/opensearch/supported-field-types/geo-point/ LGTM. |
|
} | ||
|
||
@Test | ||
public void test_geo_point_unsupported_format() throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding a test for lat
issue and separate test for lon
issue from opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/OpenSearchJsonContent.java
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually cant load non-number values in to lat and lon to OpenSearch. So integtests won't work. I believe this is just a fail safe for the valueFactory. There are unit tests for this I think that would be enough. Thoughts?
opensearch/src/test/java/org/opensearch/sql/opensearch/client/OpenSearchRestClientTest.java
Outdated
Show resolved
Hide resolved
opensearch/src/test/java/org/opensearch/sql/opensearch/client/OpenSearchNodeClientTest.java
Outdated
Show resolved
Hide resolved
integ-test/src/test/java/org/opensearch/sql/sql/GeoPointIT.java
Outdated
Show resolved
Hide resolved
opensearch/src/main/java/org/opensearch/sql/opensearch/data/utils/OpenSearchJsonContent.java
Show resolved
Hide resolved
Please, fix tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, rebase or merge on upstream to fix CI
opensearch/src/main/java/org/opensearch/sql/opensearch/data/type/OpenSearchDataType.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
* Added changes from POC PR Signed-off-by: Guian Gumpac <[email protected]> * Added geopoint parser for value factory Signed-off-by: Guian Gumpac <[email protected]> * Fixed old tests Signed-off-by: Guian Gumpac <[email protected]> * Fixed all old tests Signed-off-by: Guian Gumpac <[email protected]> * Removed irrelevant changes Signed-off-by: Guian Gumpac <[email protected]> * Removed irrelevant changes Signed-off-by: Guian Gumpac <[email protected]> * Added integration tests Signed-off-by: Guian Gumpac <[email protected]> * Fixed not throwing exception for geojson Signed-off-by: Guian Gumpac <[email protected]> * Made GeoPointValue an ExprTupleValue to enable access to lat and lon Signed-off-by: Guian Gumpac <[email protected]> * Fixed checkstyle Signed-off-by: Guian Gumpac <[email protected]> * Added unit tests and removed unnecessary code Signed-off-by: Guian Gumpac <[email protected]> * reverted irrelevant changes Signed-off-by: Guian Gumpac <[email protected]> * Added to docs Signed-off-by: Guian Gumpac <[email protected]> * Fixed doc typo Signed-off-by: Guian Gumpac <[email protected]> * Test doctests Signed-off-by: Guian Gumpac <[email protected]> * Test doctests Signed-off-by: Guian Gumpac <[email protected]> * Remove geopoint data from doctests Signed-off-by: Guian Gumpac <[email protected]> * Fixed doctest failure Signed-off-by: Guian Gumpac <[email protected]> * Fixed doctest failure Signed-off-by: Guian Gumpac <[email protected]> * Fix doctest clean up. Signed-off-by: Yury-Fridlyand <[email protected]> * Minimized doc example Signed-off-by: Guian Gumpac <[email protected]> * Fixed doctest Signed-off-by: Guian Gumpac <[email protected]> * Fixed doctest Signed-off-by: Guian Gumpac <[email protected]> * Fixed doctest Signed-off-by: Guian Gumpac <[email protected]> * Fixed doctest Signed-off-by: Guian Gumpac <[email protected]> * Fixed reordering of results Signed-off-by: Guian Gumpac <[email protected]> * Added more rows to doctests and removed IOException: Signed-off-by: Guian Gumpac <[email protected]> * Fixed doctest Signed-off-by: Guian Gumpac <[email protected]> * Fixed doctest Signed-off-by: Guian Gumpac <[email protected]> * Addressed PR comments Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: Yury-Fridlyand <[email protected]> Co-authored-by: Yury-Fridlyand <[email protected]>
Description
Supports geo_point by adding properties for lat and lon in order for Tableau to access locations.
This PR will only support the format
{"lat": number, "lon": number}
.Geopoint will be treated as an
ExprTupleValue
to allow access to lat and lon properties.Expect results on Tableau when opensearch-project#1793 is resolved:
Follow up work:
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.