From 052eb7722325cf1ef91ff5b898c30996e688eabe Mon Sep 17 00:00:00 2001 From: JingsongLi Date: Wed, 12 Feb 2020 17:48:52 +0800 Subject: [PATCH] [FLINK-15912][table] Clean TableFactoryUtil --- .../table/factories/TableFactoryUtil.java | 29 ------------------- 1 file changed, 29 deletions(-) diff --git a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java index beca21d3bb3e0..336d6942a455a 100644 --- a/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java +++ b/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/factories/TableFactoryUtil.java @@ -24,7 +24,6 @@ import org.apache.flink.table.sinks.TableSink; import org.apache.flink.table.sources.TableSource; -import java.util.Map; import java.util.Optional; /** @@ -60,34 +59,6 @@ public static TableSink findAndCreateTableSink(TableSinkFactory.Context c } } - /** - * Returns a table source matching the properties. - */ - @SuppressWarnings("unchecked") - private static TableSource findAndCreateTableSource(Map properties) { - try { - return TableFactoryService - .find(TableSourceFactory.class, properties) - .createTableSource(properties); - } catch (Throwable t) { - throw new TableException("findAndCreateTableSource failed.", t); - } - } - - @SuppressWarnings("unchecked") - private static TableSink findAndCreateTableSink(Map properties) { - TableSink tableSink; - try { - tableSink = TableFactoryService - .find(TableSinkFactory.class, properties) - .createTableSink(properties); - } catch (Throwable t) { - throw new TableException("findAndCreateTableSink failed.", t); - } - - return tableSink; - } - /** * Creates a table sink for a {@link CatalogTable} using table factory associated with the catalog. */