You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/01/09 02:39:20 UTC

[GitHub] [flink] wangxlong commented on a change in pull request #10769: [FLINK-15479]Override explainSource method for JDBCTableSource

wangxlong commented on a change in pull request #10769: [FLINK-15479]Override explainSource method for JDBCTableSource
URL: https://github.com/apache/flink/pull/10769#discussion_r364536728
 
 

 ##########
 File path: flink-connectors/flink-jdbc/src/test/java/org/apache/flink/api/java/io/jdbc/JDBCTableSourceSinkFactoryTest.java
 ##########
 @@ -182,6 +184,12 @@ public void testJDBCWithFilter() {
 		assertEquals(projectedFields.get("aaa"), DataTypes.INT());
 		assertNull(projectedFields.get("bbb"));
 		assertEquals(projectedFields.get("ccc"), DataTypes.DOUBLE());
+
+		// test jdbc table source description
+		List<String> fieldNames = ((RowType) actual.getProducedDataType().getLogicalType()).getFieldNames();
+		String expectedSourceDescription = actual.getClass().getSimpleName()
+			+ "(" + String.join(", ", fieldNames.stream().toArray(String[]::new)) + ")";
 
 Review comment:
   @wuchong Good idea. I have updated.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services