-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[opensearch-project/geospatial#212] Fixing the IT for GeoTilesAggrega… #6120
Conversation
...ava/org/opensearch/geo/search/aggregations/bucket/AbstractGeoBucketAggregationIntegTest.java
Outdated
Show resolved
Hide resolved
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.
LGTM. Thanks!
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #6120 +/- ##
============================================
- Coverage 70.77% 70.73% -0.05%
+ Complexity 58744 58687 -57
============================================
Files 4775 4775
Lines 281000 281000
Branches 40592 40592
============================================
- Hits 198873 198759 -114
- Misses 65812 65906 +94
- Partials 16315 16335 +20
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Gradle Check (Jenkins) Run Completed with:
|
@nknize please check the PR. |
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.
two nitpicks.. otherwise LGTM! Thx for jumping on this!
final GeoPoint topLeft = new GeoPoint(); | ||
final GeoPoint bottomRight = new GeoPoint(); | ||
assert geometry != null; | ||
GeoBoundsHelper.updateBoundsForGeometry(geometry, topLeft, bottomRight); | ||
final Set<String> geoHashes = new HashSet<>(); | ||
for (int precision = MAX_PRECISION_FOR_GEO_SHAPES_AGG_TESTING; precision > 0; precision--) { | ||
if (precision > 2 && !geometryDocValue.isIntersectingRectangle(boundingRectangleForGeoShapesAgg)) { | ||
if (precision > MIN_PRECISION_WITHOUT_BB_AGGS && !intersectingWithBB) { |
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.
nit. Try to avoid negatives... they can be easily missed...
if (precision > MIN_PRECISION_WITHOUT_BB_AGGS && !intersectingWithBB) { | |
if (precision > MIN_PRECISION_WITHOUT_BB_AGGS && intersectingWithBB == false) { |
final GeoPoint topLeft = new GeoPoint(); | ||
final GeoPoint bottomRight = new GeoPoint(); | ||
assert geometry != null; | ||
GeoBoundsHelper.updateBoundsForGeometry(geometry, topLeft, bottomRight); | ||
final Set<String> geoTiles = new HashSet<>(); | ||
for (int precision = MAX_PRECISION_FOR_GEO_SHAPES_AGG_TESTING; precision > 0; precision--) { | ||
if (precision > MIN_PRECISION_WITHOUT_BB_AGGS && !intersectingWithBB) { |
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.
same nit:
if (precision > MIN_PRECISION_WITHOUT_BB_AGGS && !intersectingWithBB) { | |
if (precision > MIN_PRECISION_WITHOUT_BB_AGGS && intersectingWithBB == false) { |
Will fix the nit picks and will raise the pr again. |
…tion. Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: Navneet Verma <navneev@amazon.com>
@nknize updated the PR by fixing nitpicks. |
Gradle Check (Jenkins) Run Completed with:
|
opensearch-project#6120) Fixing the IT for GeoTilesAggregation. Signed-off-by: Navneet Verma <navneev@amazon.com>
* Add GeoTile and GeoHash Grid aggregations on GeoShapes. (#5589) Src files for GeoTile and GeoHash Aggregations on GeoShape with integration tests. Signed-off-by: Navneet Verma <navneev@amazon.com> * [opensearch-project/geospatial#212] Fixing the IT for GeoTilesAggrega… (#6120) Fixing the IT for GeoTilesAggregation. Signed-off-by: Navneet Verma <navneev@amazon.com> * [#6187, #6222] Fixing the GeoShapes GeoHash and GeoTile Aggregations Integration tests. (#6242) Changes done: * Fixed the ArrayIndexOutOfBoundsException. * Reduced the precision for GeoShapes Aggregation IT testing. Signed-off-by: Navneet Verma <navneev@amazon.com> * [#7101] Fixing the GeoTileIT#testMultivaluedGeoPointsAggregation test case. (#7166) The issue was happening because we encode the GeoPoint as long and error comes in the precision due to that encoding. The error was not taken care while generating the exepected tiles count for execpected output. Signed-off-by: Navneet Verma <navneev@amazon.com> --------- Signed-off-by: Navneet Verma <navneev@amazon.com> Signed-off-by: Heemin Kim <heemin@amazon.com> Co-authored-by: Navneet Verma <navneev@amazon.com>
Description
Fixing the IT for GeoTilesAggregation.
Signed-off-by: Navneet Verma navneev@amazon.com
Issues Resolved
opensearch-project/geospatial#212
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.