-
Notifications
You must be signed in to change notification settings - Fork 429
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
GEOMESA-1150 Query planning for some literal points is broken #851
Conversation
The utility that computes Geohash substrings within a geometry now promotes the incoming geometry to a non-zero area figure. In addition, the FilterHelper has been refactored to handle POINT literal geometries in the right-hand-child slot. Unit tests were expanded to reproduce the originally observed error, and to confirm that those same tests now pass. Signed-off-by: Chris Eichelberger <cne1x@ccri.com>
val stQueriedCount = fs.getFeatures(q).size | ||
val indexOnlyCount = fs.getFeatures(indexOnlyQuery).size | ||
//TODO cne1x debug! | ||
println(s"Query:\n $filterString\n Expected count: $optExpectedCount -> $expectedCount" + |
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.
fix println (logger or remove)
@@ -50,7 +67,9 @@ object FilterHelper { | |||
updateToIDLSafeFilter(op, safeGeometry, featureType) | |||
} | |||
|
|||
// TODO: We assume "BINOP(property, geom)"... This need not be the case. |
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.
can reference the new ticket here (1155)
case _ => | ||
throw new Exception(s"Neither child of a binary spatial operator was a literal geometry: $op") | ||
} | ||
} |
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.
This is good for now. We have some code that does something similar here: org.locationtech.geomesa.filter#checkOrder. When we go back to evaluate GEOMESA-1155 we can revisit.
looks good to me |
@@ -864,6 +864,18 @@ object GeohashUtils | |||
} yield newStr).take(maxSize + 1) | |||
} | |||
|
|||
def promoteToRegion(geom: Geometry): Geometry = geom match { | |||
case g: Point => | |||
g.buffer(1e-6) |
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.
As an insane corner case, what happens if the Point to 'contain' is at one of the 4 'corners' of the world?
Just a quick thought experiment. Probably worth merging...
merging |
The utility that computes Geohash substrings within a geometry now
promotes the incoming geometry to a non-zero area figure. In
addition, the FilterHelper has been refactored to handle POINT
literal geometries in the right-hand-child slot. Unit tests
were expanded to reproduce the originally observed error, and
to confirm that those same tests now pass.
Signed-off-by: Chris Eichelberger cne1x@ccri.com