Y-Wakuta opened a new issue, #2491:
URL: https://github.com/apache/polaris/issues/2491
### Is your feature request related to a problem? Please describe.
Currently, Polaris only supports PostgreSQL and H2 databases for its
relational JDBC persistence layer. Many organizations have existing MySQL
infrastructure and expertise, making MySQL support a valuable addition for
wider adoption.
### Describe the solution you'd like
Add MySQL support to the relational-jdbc persistence module by:
1. Add MySQL to DatabaseType enum: Extend DatabaseType.java to include MySQL
as a supported database type.
2. Create MySQL-specific schema files: Add mysql/ directory under
persistence/relational-jdbc/src/main/resources/ with MySQL-compatible
schema-v2.sql (v1 is not needed for new database support).
3. Handle MySQL-specific data types in schema:
- Use JSON instead of PostgreSQL's JSONB
- Use TEXT instead of large VARCHAR for column size limitations
4. Update build dependencies: Add MySQL JDBC driver to
persistence/relational-jdbc/build.gradle.kts:
implementation(libs.mysql.connector.java)
5. Modify QueryGenerator for schema handling: Update
getFullyQualifiedTableName() method to handle MySQL's database naming (without
schema prefix):
6. Extend existing database type handling in Model classes: The JSON
handling logic already exists in ModelEntity.toMap() and
ModelPolicyMappingRecord.toMap() - just need to add MySQL case to use plain
string instead of PGobject.
### Describe alternatives you've considered
_No response_
### Additional context
MySQL was previously supported through the EclipseLink persistence
implementation (see issue https://github.com/apache/polaris/issues/241 and PR
https://github.com/apache/polaris/pull/247), but this support is now deprecated
since EclipseLink was deprecated in favor of the relational-jdbc
implementation. The relational-jdbc module, which is now the recommended
production persistence backend, does not currently include MySQL support.
--
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]