Package org.apache.calcite.rel.logical
Class LogicalFilter
- java.lang.Object
-
- org.apache.calcite.rel.AbstractRelNode
-
- org.apache.calcite.rel.SingleRel
-
- org.apache.calcite.rel.core.Filter
-
- org.apache.calcite.rel.logical.LogicalFilter
-
- All Implemented Interfaces:
java.lang.Cloneable
,RelOptNode
,RelNode
public final class LogicalFilter extends Filter
Sub-class ofFilter
not targeted at any particular engine or calling convention.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.calcite.rel.RelNode
RelNode.Context
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.ImmutableSet<CorrelationId>
variablesSet
-
Fields inherited from class org.apache.calcite.rel.AbstractRelNode
digest, id, rowType, traitSet
-
-
Constructor Summary
Constructors Constructor Description LogicalFilter(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, RexNode condition)
Deprecated.LogicalFilter(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, RexNode condition, com.google.common.collect.ImmutableSet<CorrelationId> variablesSet)
Creates a LogicalFilter.LogicalFilter(RelOptCluster cluster, RelNode child, RexNode condition)
Deprecated.LogicalFilter(RelInput input)
Creates a LogicalFilter by parsing serialized output.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RelNode
accept(RelShuttle shuttle)
Accepts a visit from a shuttle.LogicalFilter
copy(RelTraitSet traitSet, RelNode input, RexNode condition)
static LogicalFilter
create(RelNode input, RexNode condition)
Creates a LogicalFilter.static LogicalFilter
create(RelNode input, RexNode condition, com.google.common.collect.ImmutableSet<CorrelationId> variablesSet)
Creates a LogicalFilter.RelWriter
explainTerms(RelWriter pw)
Describes the inputs and attributes of this relational expression.java.util.Set<CorrelationId>
getVariablesSet()
Returns the variables that are set in this relational expression but also used and therefore not available to parents of this relational expression.-
Methods inherited from class org.apache.calcite.rel.core.Filter
accept, computeSelfCost, copy, estimateFilteredRows, estimateFilteredRows, estimateRowCount, getChildExps, getCondition, isValid
-
Methods inherited from class org.apache.calcite.rel.SingleRel
childrenAccept, deriveRowType, getInput, getInputs, replaceInput
-
Methods inherited from class org.apache.calcite.rel.AbstractRelNode
collectVariablesSet, collectVariablesUsed, computeDigest, computeSelfCost, explain, getCluster, getCollationList, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getQuery, getRelTypeName, getRows, getRowType, getTable, getTraitSet, getVariablesStopped, isDistinct, isKey, isValid, metadata, onRegister, recomputeDigest, register, sole, toString
-
-
-
-
Field Detail
-
variablesSet
private final com.google.common.collect.ImmutableSet<CorrelationId> variablesSet
-
-
Constructor Detail
-
LogicalFilter
public LogicalFilter(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, RexNode condition, com.google.common.collect.ImmutableSet<CorrelationId> variablesSet)
Creates a LogicalFilter.Use
create(org.apache.calcite.rel.RelNode, org.apache.calcite.rex.RexNode)
unless you know what you're doing.- Parameters:
cluster
- Cluster that this relational expression belongs tochild
- Input relational expressioncondition
- Boolean expression which determines whether a row is allowed to passvariablesSet
- Correlation variables set by this relational expression to be used by nested expressions
-
LogicalFilter
@Deprecated public LogicalFilter(RelOptCluster cluster, RelTraitSet traitSet, RelNode child, RexNode condition)
Deprecated.
-
LogicalFilter
@Deprecated public LogicalFilter(RelOptCluster cluster, RelNode child, RexNode condition)
Deprecated.
-
LogicalFilter
public LogicalFilter(RelInput input)
Creates a LogicalFilter by parsing serialized output.
-
-
Method Detail
-
create
public static LogicalFilter create(RelNode input, RexNode condition)
Creates a LogicalFilter.
-
create
public static LogicalFilter create(RelNode input, RexNode condition, com.google.common.collect.ImmutableSet<CorrelationId> variablesSet)
Creates a LogicalFilter.
-
getVariablesSet
public java.util.Set<CorrelationId> getVariablesSet()
Description copied from interface:RelNode
Returns the variables that are set in this relational expression but also used and therefore not available to parents of this relational expression.Note: only
Correlate
should set variables.- Specified by:
getVariablesSet
in interfaceRelNode
- Overrides:
getVariablesSet
in classAbstractRelNode
- Returns:
- Names of variables which are set in this relational expression
-
copy
public LogicalFilter copy(RelTraitSet traitSet, RelNode input, RexNode condition)
-
accept
public RelNode accept(RelShuttle shuttle)
Description copied from interface:RelNode
Accepts a visit from a shuttle.- Specified by:
accept
in interfaceRelNode
- Overrides:
accept
in classAbstractRelNode
- Parameters:
shuttle
- Shuttle- Returns:
- A copy of this node incorporating changes made by the shuttle to this node's children
-
explainTerms
public RelWriter explainTerms(RelWriter pw)
Description copied from class:AbstractRelNode
Describes the inputs and attributes of this relational expression. Each node should callsuper.explainTerms
, then call theRelWriterImpl.input(String, RelNode)
andRelWriterImpl.item(String, Object)
methods for each input and attribute.- Overrides:
explainTerms
in classFilter
- Parameters:
pw
- Plan writer- Returns:
- Plan writer for fluent-explain pattern
-
-