public abstract class Filter
extends org.apache.calcite.rel.SingleRel
implements org.apache.calcite.rel.hint.Hintable
condition
evaluates to true
.
Temporarily copy from calcite to cherry-pick [CALCITE-5107] and will be removed when upgrade the latest calcite.
If the condition allows nulls, then a null value is treated the same as false.
LogicalFilter
Modifier and Type | Field and Description |
---|---|
protected org.apache.calcite.rex.RexNode |
condition |
protected com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> |
hints |
Modifier | Constructor and Description |
---|---|
protected |
Filter(org.apache.calcite.rel.RelInput input)
Creates a Filter by parsing serialized output.
|
protected |
Filter(org.apache.calcite.plan.RelOptCluster cluster,
org.apache.calcite.plan.RelTraitSet traits,
List<org.apache.calcite.rel.hint.RelHint> hints,
org.apache.calcite.rel.RelNode child,
org.apache.calcite.rex.RexNode condition)
Creates a filter.
|
protected |
Filter(org.apache.calcite.plan.RelOptCluster cluster,
org.apache.calcite.plan.RelTraitSet traits,
org.apache.calcite.rel.RelNode child,
org.apache.calcite.rex.RexNode condition)
Creates a filter.
|
Modifier and Type | Method and Description |
---|---|
org.apache.calcite.rel.RelNode |
accept(org.apache.calcite.rex.RexShuttle shuttle) |
@Nullable org.apache.calcite.plan.RelOptCost |
computeSelfCost(org.apache.calcite.plan.RelOptPlanner planner,
org.apache.calcite.rel.metadata.RelMetadataQuery mq) |
boolean |
containsOver()
Returns whether this Filter contains any windowed-aggregate functions.
|
org.apache.calcite.rel.RelNode |
copy(org.apache.calcite.plan.RelTraitSet traitSet,
List<org.apache.calcite.rel.RelNode> inputs) |
abstract Filter |
copy(org.apache.calcite.plan.RelTraitSet traitSet,
org.apache.calcite.rel.RelNode input,
org.apache.calcite.rex.RexNode condition) |
protected boolean |
deepEquals0(@Nullable Object obj) |
protected int |
deepHashCode0() |
static double |
estimateFilteredRows(org.apache.calcite.rel.RelNode child,
org.apache.calcite.rex.RexNode condition)
Deprecated.
|
static double |
estimateFilteredRows(org.apache.calcite.rel.RelNode child,
org.apache.calcite.rex.RexProgram program)
Deprecated.
|
double |
estimateRowCount(org.apache.calcite.rel.metadata.RelMetadataQuery mq) |
org.apache.calcite.rel.RelWriter |
explainTerms(org.apache.calcite.rel.RelWriter pw) |
org.apache.calcite.rex.RexNode |
getCondition() |
com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> |
getHints() |
boolean |
isValid(org.apache.calcite.util.Litmus litmus,
org.apache.calcite.rel.RelNode.Context context) |
childrenAccept, deriveRowType, getInput, getInputs, replaceInput
accept, collectVariablesSet, collectVariablesUsed, deepEquals, deepHashCode, equals, explain, getCluster, getConvention, getCorrelVariable, getDescription, getDigest, getExpectedInputRowType, getId, getInput, getRelDigest, getRelTypeName, getRowType, getTable, getTraitSet, getVariablesSet, hashCode, isEnforcer, metadata, onRegister, recomputeDigest, register, sole, toString
protected final org.apache.calcite.rex.RexNode condition
protected final com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> hints
protected Filter(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelTraitSet traits, List<org.apache.calcite.rel.hint.RelHint> hints, org.apache.calcite.rel.RelNode child, org.apache.calcite.rex.RexNode condition)
cluster
- Cluster that this relational expression belongs totraits
- the traits of this relhints
- Hints for this nodechild
- input relational expressioncondition
- boolean expression which determines whether a row is allowed to passprotected Filter(org.apache.calcite.plan.RelOptCluster cluster, org.apache.calcite.plan.RelTraitSet traits, org.apache.calcite.rel.RelNode child, org.apache.calcite.rex.RexNode condition)
cluster
- Cluster that this relational expression belongs totraits
- the traits of this relchild
- input relational expressioncondition
- boolean expression which determines whether a row is allowed to passprotected Filter(org.apache.calcite.rel.RelInput input)
public final org.apache.calcite.rel.RelNode copy(org.apache.calcite.plan.RelTraitSet traitSet, List<org.apache.calcite.rel.RelNode> inputs)
copy
in interface org.apache.calcite.rel.RelNode
copy
in class org.apache.calcite.rel.AbstractRelNode
public abstract Filter copy(org.apache.calcite.plan.RelTraitSet traitSet, org.apache.calcite.rel.RelNode input, org.apache.calcite.rex.RexNode condition)
public org.apache.calcite.rel.RelNode accept(org.apache.calcite.rex.RexShuttle shuttle)
accept
in interface org.apache.calcite.rel.RelNode
accept
in class org.apache.calcite.rel.AbstractRelNode
public org.apache.calcite.rex.RexNode getCondition()
public final boolean containsOver()
public boolean isValid(org.apache.calcite.util.Litmus litmus, org.apache.calcite.rel.RelNode.Context context)
isValid
in interface org.apache.calcite.rel.RelNode
isValid
in class org.apache.calcite.rel.AbstractRelNode
public @Nullable org.apache.calcite.plan.RelOptCost computeSelfCost(org.apache.calcite.plan.RelOptPlanner planner, org.apache.calcite.rel.metadata.RelMetadataQuery mq)
computeSelfCost
in interface org.apache.calcite.rel.RelNode
computeSelfCost
in class org.apache.calcite.rel.AbstractRelNode
public double estimateRowCount(org.apache.calcite.rel.metadata.RelMetadataQuery mq)
estimateRowCount
in interface org.apache.calcite.rel.RelNode
estimateRowCount
in class org.apache.calcite.rel.SingleRel
@Deprecated public static double estimateFilteredRows(org.apache.calcite.rel.RelNode child, org.apache.calcite.rex.RexProgram program)
@Deprecated public static double estimateFilteredRows(org.apache.calcite.rel.RelNode child, org.apache.calcite.rex.RexNode condition)
public org.apache.calcite.rel.RelWriter explainTerms(org.apache.calcite.rel.RelWriter pw)
explainTerms
in class org.apache.calcite.rel.SingleRel
@API(since="1.24", status=INTERNAL) @EnsuresNonNullIf(expression="#1", result=true) protected boolean deepEquals0(@Nullable Object obj)
@API(since="1.24", status=INTERNAL) protected int deepHashCode0()
public com.google.common.collect.ImmutableList<org.apache.calcite.rel.hint.RelHint> getHints()
getHints
in interface org.apache.calcite.rel.hint.Hintable
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.