Package org.apache.flink.table.sources
Class TableSourceValidation
- java.lang.Object
-
- org.apache.flink.table.sources.TableSourceValidation
-
@Internal public class TableSourceValidation extends Object
Logic to validateTableSource
types.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
hasProctimeAttribute(TableSource<?> tableSource)
Checks if the givenTableSource
defines a proctime attribute.static boolean
hasRowtimeAttribute(TableSource<?> tableSource)
Checks if the givenTableSource
defines a rowtime attribute.static void
validateTableSource(TableSource<?> tableSource, TableSchema schema)
Validates a TableSource.
-
-
-
Method Detail
-
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
- TheTableSource
for which the time attributes are checked.
-
hasRowtimeAttribute
public static boolean hasRowtimeAttribute(TableSource<?> tableSource)
Checks if the givenTableSource
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 givenTableSource
defines a proctime attribute.- Parameters:
tableSource
- The table source to check.- Returns:
- true if the given table source defines proctime attribute.
-
-