wuchong commented on a change in pull request #14466:
URL: https://github.com/apache/flink/pull/14466#discussion_r548779793
##########
File path:
flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/internal/connection/JdbcConnectionProvider.java
##########
@@ -20,13 +20,40 @@
import org.apache.flink.annotation.Internal;
import java.sql.Connection;
+import java.sql.SQLException;
/**
* JDBC connection provider.
*/
@Internal
public interface JdbcConnectionProvider {
- Connection getConnection() throws Exception;
+ /**
+ * Get existing connection.
+ *
+ * @return existing connection
+ */
+ Connection getExistingConnection();
Review comment:
That makes sense. Then I would suggest to add `@Nullable` annotation on
the return type or check null in the implementation.
----------------------------------------------------------------
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]