locationtech / locationtech/geomesa
Simplify Residual Parquet GT Filters
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.5k
- Forks
- 446
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 31
Description
Simplify Residual Parquet GT Filters
Fix this...probably use SimplyingFilterVisitor
// TODO do this in the single walk // TODO optimize by removing superfluous Filter.INCLUDE trees (collapse and/ors of Filter.INCLUDE) def residualFilter(f: org.opengis.filter.Filter): org.opengis.filter.Filter = { f match { case and: org.opengis.filter.And => ff.and(and.getChildren.map(residualFilter)) case or: org.opengis.filter.Or => ff.or(or.getChildren.map(residualFilter)) case binop: org.opengis.filter.BinaryComparisonOperator => // These are all handled by the parquet attribute or date filter binop match { case _ if dtgAttrOpt.contains(binop.getExpression1.asInstanceOf[PropertyName].getPropertyName) => org.opengis.filter.Filter.INCLUDE case _ @(_: org.opengis.filter.PropertyIsEqualTo | _: org.opengis.filter.PropertyIsNotEqualTo | _: org.opengis.filter.PropertyIsLessThan | _: org.opengis.filter.PropertyIsLessThanOrEqualTo | _: org.opengis.filter.PropertyIsGreaterThan | _: org.opengis.filter.PropertyIsGreaterThanOrEqualTo) => org.opengis.filter.Filter.INCLUDE case _ => f } case _ => f } }
Original JIRA Issue: https://geomesa.atlassian.net/browse/GEOMESA-1937
Key: GEOMESA-1937
Type: Technical task
Priority: Major
Status: To Do
Resolution: Unresolved
Reporter: Andrew Hulbert
Created: Mon, 17 Jul 2017 22:24:41 -0400
Updated: Mon, 17 Jul 2017 22:25:14 -0400
Parent: GEOMESA-1905
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the residualFilter implementation and inspect the referenced SimplifyingFilterVisitor. Review the TODOs for performing the work in a single walk and removing redundant Filter.INCLUDE trees, then verify that Parquet-handled comparisons still produce correct residual filters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100