public final class FilterPushDownSpec extends SourceAbilitySpecBase
SourceAbilitySpec
that can not only serialize/deserialize the filter
to/from JSON, but also can push the filter into a SupportsFilterPushDown
.Modifier and Type | Field and Description |
---|---|
static String |
FIELD_NAME_PREDICATES |
FIELD_NAME_PRODUCED_TYPE
Constructor and Description |
---|
FilterPushDownSpec(List<org.apache.calcite.rex.RexNode> predicates) |
FilterPushDownSpec(List<org.apache.calcite.rex.RexNode> predicates,
boolean allPredicatesRetained) |
Modifier and Type | Method and Description |
---|---|
void |
apply(DynamicTableSource tableSource,
SourceAbilityContext context)
Apply the ability to the given
DynamicTableSource . |
static SupportsFilterPushDown.Result |
apply(List<org.apache.calcite.rex.RexNode> predicates,
DynamicTableSource tableSource,
SourceAbilityContext context) |
boolean |
equals(Object o) |
String |
getDigests(SourceAbilityContext context)
Additional digests to generate when this spec is applied to the source.
|
List<org.apache.calcite.rex.RexNode> |
getPredicates() |
int |
hashCode() |
boolean |
isAllPredicatesRetained() |
boolean |
needAdjustFieldReferenceAfterProjection()
Does this spec needs adjust field reference after projection.
|
getProducedType
public static final String FIELD_NAME_PREDICATES
public FilterPushDownSpec(List<org.apache.calcite.rex.RexNode> predicates, boolean allPredicatesRetained)
public FilterPushDownSpec(List<org.apache.calcite.rex.RexNode> predicates)
public boolean isAllPredicatesRetained()
public List<org.apache.calcite.rex.RexNode> getPredicates()
public void apply(DynamicTableSource tableSource, SourceAbilityContext context)
SourceAbilitySpec
DynamicTableSource
.public static SupportsFilterPushDown.Result apply(List<org.apache.calcite.rex.RexNode> predicates, DynamicTableSource tableSource, SourceAbilityContext context)
public boolean needAdjustFieldReferenceAfterProjection()
SourceAbilitySpec
RexNode
or references fields in scan table, the referenced field indices maybe changed after
projection pushdown with scan reuse. Under such case, this method need to return true to
notify planner doesn't reuse the scan.public String getDigests(SourceAbilityContext context)
SourceAbilitySpec
context
- The context about the source.public boolean equals(Object o)
equals
in class SourceAbilitySpecBase
public int hashCode()
hashCode
in class SourceAbilitySpecBase
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.