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/08 11:28:09 UTC

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

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

 ##########
 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:
   I think we should add an integreation test to verify the JDBC source can work when project is pushed down. 
   
   

----------------------------------------------------------------
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