godfreyhe commented on a change in pull request #11276: 
[FLINK-16029][table-planner-blink] Remove register source and sink in test 
cases of blink planner
URL: https://github.com/apache/flink/pull/11276#discussion_r402259720
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/utils/testTableSources.scala
 ##########
 @@ -705,6 +724,63 @@ class TestDataTypeTableSource(
   override def getTableSchema: TableSchema = tableSchema
 }
 
+class TestDataTypeTableSourceFactory extends TableSourceFactory[Row] {
+
+  override def createTableSource(properties: JMap[String, String]): 
TableSource[Row] = {
+    val descriptorProperties = new DescriptorProperties
+    descriptorProperties.putProperties(properties)
+    //    val tableSchema = TableSchemaUtils.getPhysicalSchema(
+    //      descriptorProperties.getTableSchema(SCHEMA))
+    // Use the tableSchema in the companion object to keep the actual 
conversion class
+    new TestDataTypeTableSource(
+      TestDataTypeTableSource.tableSchema, TestDataTypeTableSource.data)
+  }
+
+  override def requiredContext(): JMap[String, String] = {
+    val context = new util.HashMap[String, String]()
+    context.put(CONNECTOR_TYPE, "TestDataTypeTableSource")
+    context
+  }
+
+  override def supportedProperties(): JList[String] = {
+    val supported = new util.ArrayList[String]()
+    supported.add("*")
+    supported
+  }
+}
+
+object TestDataTypeTableSource {
+  var data: Seq[Row] = null
 
 Review comment:
   avoid `static variable`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to