-
Notifications
You must be signed in to change notification settings - Fork 314
Add support for MySQL Metastore #2704
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
base: main
Are you sure you want to change the base?
Add support for MySQL Metastore #2704
Conversation
runtimeOnly("org.postgresql:postgresql") | ||
runtimeOnly(project(":polaris-relational-jdbc")) | ||
runtimeOnly("io.quarkus:quarkus-jdbc-postgresql") | ||
implementation(libs.mysql.connector.j) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the connector license is not compatible with ASF, AFAIK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed this conversation, maybe I will create documentation later on which references this PR on how to get MySQL support if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything except the driver is acceptable, I think.
So, @Jayden-Chiu : you may want to keep the java code changes, but remove the driver dependency. That would be mergeable from my POV (pending reviews from other maintainers, of course). Then, instructions on bundling MySQL Connector in a local build could be much simpler.
If the instructions for downstream builds with MySQL were added to a README or docs, that would make a well-rounded PR, from my POV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why add earlier schemas? MySQL was not supported when v1 was current 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is currently only checked within a persistence impl, these version numbers are also per persistence impl. There's no requirement that MySQL vN align with postgres vN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So rather than just starting with mysql v3, you could just start with mysql v1 with all the tables that postgres v3 has.
As discussed in #2491 , there is currently no support for MySQL as a metastore. many organizations (mine included) rely on existing MySQL infrastructure and this PR adds MySQL support to the
relational-jdbc
module with tests. This PR mostly extends existing code for Postgres support, adding MySQL toDatabaseType
enum, and changing existing methods to handle MySQLDatabaseType
and adding MySQL JDBC driver topersistence/relational-jdbc/build.gradle.kts
andruntime/server/build.gradle.kts