jarredhj0214 opened a new issue, #13798:
URL: https://github.com/apache/gravitino/issues/13798

   ### What would you like to be improved?
   
   A Gravitino MySQL catalog can be configured with an instance-level JDBC URL 
before users select a database. However, the Flink connector requires 
`default-database` when initializing the catalog.
   
   Even a query with a fully qualified table name fails:
   
   ```sql
   SELECT *
   FROM mysql_catalog.my_database.my_table;
   ```
   
   The error is:
   
   ```text
   Unable to create catalog 'mysql_catalog'
   Caused by: java.lang.IllegalArgumentException: default-database should not 
be null.
   ```
   
   The documented workaround is to configure `flink.bypass.default-database` in 
the Gravitino catalog. This requires users to select a database when 
configuring the catalog, even if every query specifies one explicitly.
   
   ### How should we improve?
   
   Allow the Flink connector to initialize a MySQL catalog without a configured 
default database and resolve fully qualified table references using the 
database specified in SQL.
   
   If a query requires a default database but none is configured, provide a 
clear error asking the user to select one.
   


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