Search in sources :

Example 1 with UnresolvedPhysicalColumn

use of org.apache.flink.table.api.Schema.UnresolvedPhysicalColumn in project flink by apache.

the class SchemaTranslator method patchDataTypeFromDeclaredSchema.

private static DataType patchDataTypeFromDeclaredSchema(DataTypeFactory dataTypeFactory, DataType inputDataType, List<UnresolvedColumn> declaredColumns) {
    final List<UnresolvedPhysicalColumn> physicalColumns = declaredColumns.stream().filter(SchemaTranslator::isPhysical).map(UnresolvedPhysicalColumn.class::cast).collect(Collectors.toList());
    DataType patchedDataType = inputDataType;
    for (UnresolvedPhysicalColumn physicalColumn : physicalColumns) {
        patchedDataType = patchDataTypeFromColumn(dataTypeFactory, patchedDataType, physicalColumn);
    }
    return patchedDataType;
}
Also used : DataType(org.apache.flink.table.types.DataType) AbstractDataType(org.apache.flink.table.types.AbstractDataType) UnresolvedPhysicalColumn(org.apache.flink.table.api.Schema.UnresolvedPhysicalColumn)

Aggregations

UnresolvedPhysicalColumn (org.apache.flink.table.api.Schema.UnresolvedPhysicalColumn)1 AbstractDataType (org.apache.flink.table.types.AbstractDataType)1 DataType (org.apache.flink.table.types.DataType)1