Search in sources :

Example 1 with CompactPartitions

use of org.apache.flink.table.connector.source.CompactPartitions in project flink by apache.

the class TestManagedTableFactory method createDynamicTableSource.

@Override
public DynamicTableSource createDynamicTableSource(Context context) {
    FactoryUtil.TableFactoryHelper helper = FactoryUtil.createTableFactoryHelper(this, context);
    ChangelogMode changelogMode = parseChangelogMode(helper.getOptions().get(CHANGELOG_MODE));
    CompactPartitions compactPartitions = deserializeCompactPartitions(context.getCatalogTable().getOptions().getOrDefault(COMPACT_FILE_ENTRIES.key(), "")).orElse(CompactPartitions.from(Collections.emptyList()));
    return new TestManagedTableSource(context, compactPartitions, changelogMode);
}
Also used : ChangelogMode(org.apache.flink.table.connector.ChangelogMode) CompactPartitions(org.apache.flink.table.connector.source.CompactPartitions) CompactPartitions.deserializeCompactPartitions(org.apache.flink.table.connector.source.CompactPartitions.deserializeCompactPartitions) CompactPartitions.serializeCompactPartitions(org.apache.flink.table.connector.source.CompactPartitions.serializeCompactPartitions) TestManagedTableSource(org.apache.flink.table.connector.source.TestManagedTableSource)

Aggregations

ChangelogMode (org.apache.flink.table.connector.ChangelogMode)1 CompactPartitions (org.apache.flink.table.connector.source.CompactPartitions)1 CompactPartitions.deserializeCompactPartitions (org.apache.flink.table.connector.source.CompactPartitions.deserializeCompactPartitions)1 CompactPartitions.serializeCompactPartitions (org.apache.flink.table.connector.source.CompactPartitions.serializeCompactPartitions)1 TestManagedTableSource (org.apache.flink.table.connector.source.TestManagedTableSource)1