public class ScanReuserUtils extends Object
ScanReuser.| Modifier and Type | Method and Description |
|---|---|
static List<SourceAbilitySpec> |
abilitySpecsWithoutEscaped(TableSourceTable table)
Returns a list of
SourceAbilitySpec instances associated with a given TableSourceTable instance, excluding some particular abilities, such as ProjectPushDownSpec. |
static int[][] |
concatProjectedFields(org.apache.flink.table.catalog.ResolvedSchema schema,
org.apache.flink.table.types.logical.RowType originType,
int[][] physicalFields,
List<String> metaKeys) |
static boolean |
containsRexNodeSpecAfterProjection(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(TableSourceTable table,
org.apache.flink.table.types.logical.RowType oldSourceType,
org.apache.flink.table.types.logical.RowType newSourceType)
Watermark push down must be after projection push down, so we need to adjust its index.
|
static String |
getDigest(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(TableSourceTable source) |
static CommonPhysicalTableSourceScan |
pickScanWithWatermark(List<CommonPhysicalTableSourceScan> scans) |
static int[][] |
projectedFields(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(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(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(TableSourceTable table, org.apache.flink.table.types.logical.RowType oldSourceType, org.apache.flink.table.types.logical.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(TableSourceTable source)
public static int[][] concatProjectedFields(org.apache.flink.table.catalog.ResolvedSchema schema,
org.apache.flink.table.types.logical.RowType originType,
int[][] physicalFields,
List<String> metaKeys)
public static boolean reusableWithoutAdjust(List<? extends org.apache.calcite.rel.RelNode> reusableNodes)
public static String getDigest(CommonPhysicalTableSourceScan scan, boolean withoutEscape)
CommonPhysicalTableSourceScan, which ignoring certain SourceAbilitySpec.scan - input CommonPhysicalTableSourceScan.withoutEscape - Whether to include these escape SourceAbilitySpecs in returned
digest.SourceAbilitySpec.public static <T extends SourceAbilitySpec> T getAbilitySpec(SourceAbilitySpec[] abilitySpecs, Class<T> specClass)
public static CommonPhysicalTableSourceScan pickScanWithWatermark(List<CommonPhysicalTableSourceScan> scans)
Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.