Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement] Trim database value in the JDBC URI #4884

Open
yuqi1129 opened this issue Sep 8, 2024 · 3 comments
Open

[Improvement] Trim database value in the JDBC URI #4884

yuqi1129 opened this issue Sep 8, 2024 · 3 comments
Labels
improvement Improvements on everything

Comments

@yuqi1129
Copy link
Contributor

yuqi1129 commented Sep 8, 2024

What would you like to be improved?

All databases can be viewed, even if the user specifies a JDBC URI with a schema name when creating a JDBC catalog like MySQL or PostgreSQL. For example, if the JDBC URL is jdbc:mysql://127.0.0.1:33540/db1, when we uses listSchema API to list schemes in the catalog, some other schemas can still be seen.

How should we improve?

So I suggest we shorten the last database name to in the creating process.

@yuqi1129 yuqi1129 added the improvement Improvements on everything label Sep 8, 2024
@diqiu50
Copy link
Contributor

diqiu50 commented Sep 9, 2024

In the Trino, the mysql connector only supports the jdbc url without a database. But, the postgressql connector only supports the url with a database.
What do you want to do about it? If the Graviton server does not report an error, do I need to make it compatible or report an error on the Trino connector

@yuqi1129
Copy link
Contributor Author

yuqi1129 commented Sep 9, 2024

the postgressql connector only supports the url with a database

This shouldn't be an issue. In Gravitino, each PostgreSQL catalog is separated by database, so it seems be to okay for PG. I will only trim the database for MySQL, Doris, and leave PostgreSQL as is.

@diqiu50
Copy link
Contributor

diqiu50 commented Sep 12, 2024

I think it should throw an error instead of trimming the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvements on everything
Projects
None yet
Development

No branches or pull requests

2 participants