locationtech / locationtech/geomesa

Simplify Residual Parquet GT Filters

Open
#5,778 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.