public class ScanReuserUtils extends Object
ScanReuser
.Modifier and Type | Method and Description |
---|---|
static List<SourceAbilitySpec> |
abilitySpecsWithoutEscaped(org.apache.flink.table.planner.plan.schema.TableSourceTable table)
Returns a list of
SourceAbilitySpec instances associated with a given TableSourceTable instance, excluding some particular abilities, such as ProjectPushDownSpec . |
static int[][] |
concatProjectedFields(ResolvedSchema schema,
RowType originType,
int[][] physicalFields,
List<String> metaKeys) |
static boolean |
containsRexNodeSpecAfterProjection(org.apache.flink.table.planner.plan.nodes.physical.common.CommonPhysicalTableSourceScan table)
Contains
SourceAbilitySpec.needAdjustFieldReferenceAfterProjection() spec after
projection push down except WatermarkPushDownSpec . |
static org.apache.calcite.rel.core.Calc |
createCalcForScan(org.apache.calcite.rel.RelNode input,
org.apache.calcite.rex.RexProgram program) |
static <T extends SourceAbilitySpec> |
getAbilitySpec(SourceAbilitySpec[] abilitySpecs,
Class<T> specClass) |
static Optional<WatermarkPushDownSpec> |
getAdjustedWatermarkSpec(org.apache.flink.table.planner.plan.schema.TableSourceTable table,
RowType oldSourceType,
RowType newSourceType)
Watermark push down must be after projection push down, so we need to adjust its index.
|
static String |
getDigest(org.apache.flink.table.planner.plan.nodes.physical.common.CommonPhysicalTableSourceScan scan,
boolean withoutEscape)
Get the digest of
CommonPhysicalTableSourceScan , which ignoring certain SourceAbilitySpec . |
static int |
indexOf(int[][] projectedFields,
int[] fieldIndices)
Found the index of specific projected field in the nested array which is made up of all
projected fields index paths.
|
static boolean |
isEscapeDigest(SourceAbilitySpec spec) |
static List<String> |
metadataKeys(org.apache.flink.table.planner.plan.schema.TableSourceTable source) |
static org.apache.flink.table.planner.plan.nodes.physical.common.CommonPhysicalTableSourceScan |
pickScanWithWatermark(List<org.apache.flink.table.planner.plan.nodes.physical.common.CommonPhysicalTableSourceScan> scans) |
static int[][] |
projectedFields(org.apache.flink.table.planner.plan.schema.TableSourceTable source) |
static boolean |
reusableWithoutAdjust(List<? extends org.apache.calcite.rel.RelNode> reusableNodes) |
public static int indexOf(int[][] projectedFields, int[] fieldIndices)
public static List<SourceAbilitySpec> abilitySpecsWithoutEscaped(org.apache.flink.table.planner.plan.schema.TableSourceTable table)
SourceAbilitySpec
instances associated with a given TableSourceTable
instance, excluding some particular abilities, such as ProjectPushDownSpec
. These abilities don't need before do scan reuse.public static boolean isEscapeDigest(SourceAbilitySpec spec)
public static boolean containsRexNodeSpecAfterProjection(org.apache.flink.table.planner.plan.nodes.physical.common.CommonPhysicalTableSourceScan table)
SourceAbilitySpec.needAdjustFieldReferenceAfterProjection()
spec after
projection push down except WatermarkPushDownSpec
. We have customized the solution
for watermark push down.public static Optional<WatermarkPushDownSpec> getAdjustedWatermarkSpec(org.apache.flink.table.planner.plan.schema.TableSourceTable table, RowType oldSourceType, RowType newSourceType)
public static org.apache.calcite.rel.core.Calc createCalcForScan(org.apache.calcite.rel.RelNode input, org.apache.calcite.rex.RexProgram program)
public static int[][] projectedFields(org.apache.flink.table.planner.plan.schema.TableSourceTable source)
public static List<String> metadataKeys(org.apache.flink.table.planner.plan.schema.TableSourceTable source)
public static int[][] concatProjectedFields(ResolvedSchema schema, RowType originType, int[][] physicalFields, List<String> metaKeys)
public static boolean reusableWithoutAdjust(List<? extends org.apache.calcite.rel.RelNode> reusableNodes)
public static String getDigest(org.apache.flink.table.planner.plan.nodes.physical.common.CommonPhysicalTableSourceScan scan, boolean withoutEscape)
CommonPhysicalTableSourceScan
, which ignoring certain SourceAbilitySpec
.scan
- input CommonPhysicalTableSourceScan
.withoutEscape
- Whether to include these escape SourceAbilitySpec
s in returned
digest.SourceAbilitySpec
.public static <T extends SourceAbilitySpec> T getAbilitySpec(SourceAbilitySpec[] abilitySpecs, Class<T> specClass)
public static org.apache.flink.table.planner.plan.nodes.physical.common.CommonPhysicalTableSourceScan pickScanWithWatermark(List<org.apache.flink.table.planner.plan.nodes.physical.common.CommonPhysicalTableSourceScan> scans)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.