Skip to content

Conversation

Jayden-Chiu
Copy link

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 to DatabaseType enum, and changing existing methods to handle MySQL DatabaseType and adding MySQL JDBC driver to persistence/relational-jdbc/build.gradle.kts and runtime/server/build.gradle.kts

runtimeOnly("org.postgresql:postgresql")
runtimeOnly(project(":polaris-relational-jdbc"))
runtimeOnly("io.quarkus:quarkus-jdbc-postgresql")
implementation(libs.mysql.connector.j)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot ship this dependency it seems.

See this comment:

#2491 (comment)

\cc @jbonofre

Copy link
Contributor

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.

Copy link
Author

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.

Copy link
Contributor

@dimas-b dimas-b Sep 30, 2025

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.

@singhpk234 singhpk234 self-requested a review September 29, 2025 15:21
Copy link
Contributor

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 🤔

Copy link
Contributor

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.

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants