wuchong commented on a change in pull request #11047: [FLINK-15912][table] Add Context to TableSourceFactory and TableSinkFactory URL: https://github.com/apache/flink/pull/11047#discussion_r380001365
########## File path: flink-table/flink-table-api-java-bridge/src/main/java/org/apache/flink/table/factories/StreamTableSourceFactory.java ########## @@ -48,4 +61,12 @@ default TableSource<T> createTableSource(Map<String, String> properties) { return createStreamTableSource(properties); } + + /** + * Only create a stream table source. + */ + @Override + default TableSource<T> createTableSource(Context context) { + return createStreamTableSource(context); Review comment: We should validate the return value of `createStreamTableSource` is not null. If is null, we should throw an exception to indicate users to implement `createTableSource(context)`, because `createStreamTableSource(Map)` is default implemented now, and users may not override it. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services