Interface SourceAbilitySpec

All Known Implementing Classes:
AggregatePushDownSpec, FilterPushDownSpec, LimitPushDownSpec, PartitionPushDownSpec, ProjectPushDownSpec, ReadingMetadataSpec, SourceAbilitySpecBase, SourceWatermarkSpec, WatermarkPushDownSpec

@Internal public interface SourceAbilitySpec
An interface that can not only serialize/deserialize the source abilities to/from JSON, but also can apply the abilities to a DynamicTableSource.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(org.apache.flink.table.connector.source.DynamicTableSource tableSource, SourceAbilityContext context)
    Apply the ability to the given DynamicTableSource.
    Additional digests to generate when this spec is applied to the source.
    Optional<org.apache.flink.table.types.logical.RowType>
    Return the produced RowType this the ability is applied.
    boolean
    Does this spec needs adjust field reference after projection.
  • Method Details

    • apply

      void apply(org.apache.flink.table.connector.source.DynamicTableSource tableSource, SourceAbilityContext context)
      Apply the ability to the given DynamicTableSource.
    • getProducedType

      Optional<org.apache.flink.table.types.logical.RowType> getProducedType()
      Return the produced RowType this the ability is applied.

      NOTE: If the ability does not change the produced type, this method will return Optional.empty().

    • needAdjustFieldReferenceAfterProjection

      boolean needAdjustFieldReferenceAfterProjection()
      Does this spec needs adjust field reference after projection. If the spec contains 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.
    • getDigests

      String getDigests(SourceAbilityContext context)
      Additional digests to generate when this spec is applied to the source.
      Parameters:
      context - The context about the source.