Hongshun Wang created FLINK-38616:
-------------------------------------

             Summary: Jdbc Catalog supports jdbc properties.
                 Key: FLINK-38616
                 URL: https://issues.apache.org/jira/browse/FLINK-38616
             Project: Flink
          Issue Type: Improvement
          Components: Connectors / JDBC
    Affects Versions: jdbc-4.0.0
            Reporter: Hongshun Wang
             Fix For: jdbc-4.1.0


In DriverManager, we can pass the info into a connection, which is more 
flexible.
{code:java}
@CallerSensitive
public static Connection getConnection(String url,
    java.util.Properties info) throws SQLException {

    return (getConnection(url, info, Reflection.getCallerClass()));
} {code}
 

Currently ,in jdbc catalog, only username and password is passed( other jdbc 
properties is not provided.
{code:java}
@Override
public CatalogBaseTable getTable(ObjectPath tablePath)
        throws TableNotExistException, CatalogException {

    if (!tableExists(tablePath)) {
        throw new TableNotExistException(getName(), tablePath);
    }

    String databaseName = tablePath.getDatabaseName();
    String dbUrl = baseUrl + databaseName;

    try (Connection conn = DriverManager.getConnection(dbUrl, username, pwd)) {
////
} {code}
Why not pass the jdbc properties into catalog?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to