JingsongLi commented on a change in pull request #41:
URL: https://github.com/apache/flink-table-store/pull/41#discussion_r826525388



##########
File path: 
flink-table-store-connector/src/main/java/org/apache/flink/table/store/connector/TableStoreFactory.java
##########
@@ -129,6 +155,85 @@ public void onDropTable(Context context, boolean 
ignoreIfNotExists) {
         throw new UnsupportedOperationException("Not implement yet");
     }
 
+    @Override
+    public DynamicTableSource createDynamicTableSource(Context context) {
+        boolean streaming =
+                context.getConfiguration().get(ExecutionOptions.RUNTIME_MODE)
+                        == RuntimeExecutionMode.STREAMING;
+        LogSourceProvider logSourceProvider = null;
+        if (enableChangeTracking(context.getCatalogTable().getOptions())) {
+            logSourceProvider =
+                    createLogStoreTableFactory()
+                            .createSourceProvider(
+                                    createLogStoreContext(context),
+                                    new LogStoreTableFactory.SourceContext() {
+                                        @Override
+                                        public <T> TypeInformation<T> 
createTypeInformation(
+                                                DataType producedDataType) {
+                                            return createTypeInformation(
+                                                    
TypeConversions.fromDataToLogicalType(
+                                                            producedDataType));
+                                        }
+
+                                        @Override
+                                        public <T> TypeInformation<T> 
createTypeInformation(
+                                                LogicalType 
producedLogicalType) {
+                                            return 
InternalTypeInfo.of(producedLogicalType);
+                                        }
+
+                                        @Override
+                                        public 
DynamicTableSource.DataStructureConverter
+                                                createDataStructureConverter(
+                                                        DataType 
producedDataType) {
+                                            return 
ScanRuntimeProviderContext.INSTANCE
+                                                    
.createDataStructureConverter(producedDataType);
+                                        }
+                                    });
+        }
+        return new StoreTableSource(buildTableStore(context), streaming, 
logSourceProvider);
+    }
+
+    @Override
+    public DynamicTableSink createDynamicTableSink(Context context) {
+        LogSinkProvider logSinkProvider = null;
+        if (enableChangeTracking(context.getCatalogTable().getOptions())) {
+            filterLogStoreOptions(context.getCatalogTable().getOptions());

Review comment:
       ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to