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

GEOMESA-1150 Query planning for some literal points is broken #851

Closed
wants to merge 3 commits into from

Conversation

cne1x
Copy link
Contributor

@cne1x cne1x commented Mar 31, 2016

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

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" +
Copy link
Contributor

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.
Copy link
Contributor

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")
}
}
Copy link
Contributor

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.

@elahrvivaz
Copy link
Contributor

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)
Copy link
Contributor

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...

@elahrvivaz
Copy link
Contributor

merging

@elahrvivaz
Copy link
Contributor

d1ee069

@elahrvivaz elahrvivaz closed this Mar 31, 2016
@jnh5y jnh5y deleted the fcr_contains_point branch August 5, 2016 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants