diqiu50 opened a new pull request, #12930:
URL: https://github.com/apache/gravitino/pull/12930

   ### What changes were proposed in this pull request?
   
   For PostgreSQL catalogs, `JdbcPropertiesConverter#toFlinkTableProperties` 
used the Flink "database" (= Postgres schema) as the JDBC scan connection 
database instead of the real `jdbc-database`. This PR makes 
`PostgresqlPropertiesConverter` use the catalog's actual database (via 
`default-database`, defaulted from `jdbc-database`) for the connection, and 
carries the schema via a schema-qualified `table-name` instead. MySQL behavior 
is unchanged.
   
   ### Why are the changes needed?
   
   Flink SQL `SELECT` on a Postgres catalog table fails with `FATAL: database 
"public" does not exist`.
   
   Fix: #12929
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. PostgreSQL Flink table scans now work; previously always failed.
   
   ### How was this patch tested?
   
   Added unit tests in 
`TestPostgresqlPropertiesConverter`/`TestMysqlPropertiesConverter`; ran 
`FlinkJdbcMysqlCatalogIT120` (passes, no regression).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01Kqa6kk4Wkdt9VC6s5Znipo
   


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

Reply via email to