diqiu50 opened a new issue, #14801: URL: https://github.com/apache/gravitino/issues/14801
### Version main branch ### Describe what's wrong For a `jdbc-postgresql` catalog with `jdbc-database=<pg_db>` and `flink.bypass.default-database=public`, the Flink connector has two problems: 1. `flink.bypass.base-url` is always overwritten by the host from `jdbc-url`, so Flink cannot reach the database through a different address than the Gravitino server. 2. Table scans connect to `<base-url>/public` instead of `<base-url>/<pg_db>`, because `default-database` is used as the connection database. For PostgreSQL a Flink database is a schema, so `default-database` should name the schema and the connection should always target `jdbc-database`. ### Error message and/or stacktrace ```text org.apache.flink.table.api.ValidationException: Failed connecting to jdbc:postgresql://<in-cluster-host>:5432/public via JDBC. ``` ### How to reproduce 1. Create a `jdbc-postgresql` catalog with `jdbc-url` pointing at a host only reachable by the Gravitino server, `jdbc-database=<pg_db>`, `flink.bypass.default-database=public`, and `flink.bypass.base-url` pointing at a host reachable by Flink. 2. In Flink, run `CREATE TABLE`, `INSERT` and `SELECT` on `<catalog>.public.t`. The connection uses the `jdbc-url` host and database `public`. ### Additional context Related to #12929. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
