java.lang.Object
org.elasticsearch.compute.operator.AbstractPageMappingOperator
org.elasticsearch.compute.operator.FilterOperator
- All Implemented Interfaces:
Closeable,AutoCloseable,Operator,Releasable
Filters rows from input
Pages. Keeps things that evaluate to true
and discards things that return false or null.
┌──────┬──────────┬────────────┐ ┌──────┬──────────┬────────────┐
│ ref │ class │ discovered │ │ ref │ class │ discovered │
├──────┼──────────┼────────────┤ ├──────┼──────────┼────────────┤
│ 173 │ Euclid │ 1993-01-01 │ │ 173 │ Euclid │ 1993-01-01 │
│ 2317 │ Keter │ 1922-01-01 │ -> │ 2639 │ Euclid │ 2010-01-01 │
│ 2639 │ Euclid │ 2010-01-01 │ │ 3001 │ Euclid │ 2000-01-02 │
│ 3000 │ Thaumiel │ 1971-01-01 │ └──────┴──────────┴────────────┘
│ 3001 │ Euclid │ 2000-01-02 │
│ 5000 │ Safe │ 2020-12-04 │
└──────┴──────────┴────────────┘
ExpressionEvaluators are the things that actually evaluate the filter.
They form a tree. GREATER_THAN(LENGTH(class), DATE_EXTRACT("month", discovered))
looks like:
┌──────────────┐
│ GREATER_THAN │
└──────┬───────┘
┌────────────────┴────────────────┐
▼ ▼
┌────────┐ ┌──────────────┐
│ LENGTH │ │ DATE_EXTRACT │
└────┬───┘ └──────┬───────┘
│ ┌──────────┴──────────┐
▼ ▼ ▼
┌─────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ LOAD(class) │ │ LITERAL("month") │ │ LOAD(discovered) │
└─────────────┘ └──────────────────┘ └──────────────────┘
Which evaluates to like:00b
┌──────┬──────────┬────────────┐ ┌──────┬──────────┬────────────┐
│ ref │ class │ discovered │ │ ref │ class │ discovered │
├──────┼──────────┼────────────┤ ├──────┼──────────┼────────────┤
│ 173 │ Euclid │ 1993-01-01 │ │ 173 │ Euclid │ 1993-01-01 │
│ 2317 │ Keter │ 1922-01-01 │ │ 2317 │ Keter │ 1922-01-01 │
│ 2639 │ Euclid │ 2010-01-01 │ -> │ 2639 │ Euclid │ 2010-01-01 │
│ 3000 │ Thaumiel │ 1971-01-01 │ │ 3000 │ Thaumiel │ 1971-01-01 │
│ 3001 │ Euclid │ 2000-01-02 │ │ 3001 │ Euclid │ 2000-01-02 │
│ 5000 │ Safe │ 2020-12-04 │ └──────┴──────────┴────────────┘
└──────┴──────────┴────────────┘
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.compute.operator.AbstractPageMappingOperator
AbstractPageMappingOperator.StatusNested classes/interfaces inherited from interface org.elasticsearch.compute.operator.Operator
Operator.OperatorFactory -
Field Summary
Fields inherited from interface org.elasticsearch.compute.operator.Operator
MIN_TARGET_PAGE_SIZE, NOT_BLOCKED, TARGET_PAGE_SIZE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.elasticsearch.compute.operator.AbstractPageMappingOperator
addInput, canProduceMoreDataWithoutExtraInput, finish, getOutput, isFinished, needsInput, status, statusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.compute.operator.Operator
isBlocked, tryPromote
-
Constructor Details
-
FilterOperator
-
-
Method Details
-
process
- Specified by:
processin classAbstractPageMappingOperator
-
toString
- Specified by:
toStringin classAbstractPageMappingOperator
-
close
public void close()Description copied from interface:Operatornotifies the operator that it won't be used anymore (i.e. none of the other methods called), and its resources can be cleaned up- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceOperator- Specified by:
closein interfaceReleasable- Overrides:
closein classAbstractPageMappingOperator
-