|
19 | 19 |
|
20 | 20 | package org.apache.gravitino.flink.connector.jdbc;
|
21 | 21 |
|
22 |
| -import java.util.Map; |
23 | 22 | import java.util.Optional;
|
24 | 23 | import org.apache.flink.connector.jdbc.catalog.JdbcCatalog;
|
25 | 24 | import org.apache.flink.connector.jdbc.catalog.factory.JdbcCatalogFactory;
|
26 | 25 | import org.apache.flink.connector.jdbc.table.JdbcDynamicTableFactory;
|
27 | 26 | import org.apache.flink.table.catalog.AbstractCatalog;
|
28 |
| -import org.apache.flink.table.catalog.CatalogBaseTable; |
29 |
| -import org.apache.flink.table.catalog.ObjectPath; |
30 |
| -import org.apache.flink.table.catalog.exceptions.CatalogException; |
31 |
| -import org.apache.flink.table.catalog.exceptions.TableNotExistException; |
32 | 27 | import org.apache.flink.table.factories.CatalogFactory;
|
33 | 28 | import org.apache.flink.table.factories.Factory;
|
34 | 29 | import org.apache.gravitino.flink.connector.PartitionConverter;
|
@@ -65,22 +60,4 @@ protected AbstractCatalog realCatalog() {
|
65 | 60 | public Optional<Factory> getFactory() {
|
66 | 61 | return Optional.of(new JdbcDynamicTableFactory());
|
67 | 62 | }
|
68 |
| - |
69 |
| - @Override |
70 |
| - public CatalogBaseTable getTable(ObjectPath tablePath) |
71 |
| - throws TableNotExistException, CatalogException { |
72 |
| - CatalogBaseTable table = super.getTable(tablePath); |
73 |
| - Map<String, String> contextOptions = context.getOptions(); |
74 |
| - Map<String, String> tableOptions = table.getOptions(); |
75 |
| - tableOptions.remove("engine"); |
76 |
| - tableOptions.put( |
77 |
| - "url", |
78 |
| - contextOptions.get(JdbcPropertiesConstants.FLINK_JDBC_URL) |
79 |
| - + "/" |
80 |
| - + tablePath.getDatabaseName()); |
81 |
| - tableOptions.put("table-name", tablePath.getObjectName()); |
82 |
| - tableOptions.put("username", contextOptions.get(JdbcPropertiesConstants.FLINK_JDBC_USER)); |
83 |
| - tableOptions.put("password", contextOptions.get(JdbcPropertiesConstants.FLINK_JDBC_PASSWORD)); |
84 |
| - return table; |
85 |
| - } |
86 | 63 | }
|
0 commit comments