Class TableSourceValidation

java.lang.Object
org.apache.flink.table.sources.TableSourceValidation

@Internal public class TableSourceValidation extends Object
Logic to validate TableSource types.
  • Method Details

    • validateTableSource

      public static void validateTableSource(TableSource<?> tableSource, TableSchema schema)
      Validates a TableSource.
      • checks that all fields of the schema can be resolved
      • checks that resolved fields have the correct type
      • checks that the time attributes are correctly configured.
      Parameters:
      tableSource - The TableSource for which the time attributes are checked.
    • hasRowtimeAttribute

      public static boolean hasRowtimeAttribute(TableSource<?> tableSource)
      Checks if the given TableSource defines a rowtime attribute.
      Parameters:
      tableSource - The table source to check.
      Returns:
      true if the given table source defines rowtime attribute
    • hasProctimeAttribute

      public static boolean hasProctimeAttribute(TableSource<?> tableSource)
      Checks if the given TableSource defines a proctime attribute.
      Parameters:
      tableSource - The table source to check.
      Returns:
      true if the given table source defines proctime attribute.