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

Support ClickHouse in BuiltInBindMarkersFactoryProvider #33947

Closed
eddumelendez opened this issue Nov 22, 2024 · 6 comments
Closed

Support ClickHouse in BuiltInBindMarkersFactoryProvider #33947

eddumelendez opened this issue Nov 22, 2024 · 6 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: declined A suggestion or change that we don't feel we should currently apply

Comments

@eddumelendez
Copy link
Contributor

eddumelendez commented Nov 22, 2024

ClickHouse provides an r2dbc driver. Building a project with Testcontainers fails because of the following exception:

Caused by: org.springframework.r2dbc.core.binding.BindMarkersFactoryResolver$NoBindMarkersFactoryException: Cannot determine a BindMarkersFactory for ClickHouse using ConnectionPool[ClickHouse]

Add ClickHouse to the list

static {
BUILTIN.put("H2", BindMarkersFactory.indexed("$", 1));
BUILTIN.put("MariaDB", BindMarkersFactory.anonymous("?"));
BUILTIN.put("Microsoft SQL Server", BindMarkersFactory.named("@", "P", 32,
BuiltInBindMarkersFactoryProvider::filterBindMarker));
BUILTIN.put("MySQL", BindMarkersFactory.anonymous("?"));
BUILTIN.put("Oracle", BindMarkersFactory.named(":", "P", 32,
BuiltInBindMarkersFactoryProvider::filterBindMarker));
BUILTIN.put("PostgreSQL", BindMarkersFactory.indexed("$", 1));
}

My workaround was to created my own provider and register it in spring.factories but it fails because it also needs to support the ClickHouse dialect in spring-data-r2dbc.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 22, 2024
@sbrannen sbrannen added the in: data Issues in data modules (jdbc, orm, oxm, tx) label Nov 23, 2024
@sbrannen sbrannen changed the title Support ClickHouse in BuiltInBindMarkersFactoryProvider Support ClickHouse in BuiltInBindMarkersFactoryProvider Nov 23, 2024
@sdeleuze sdeleuze self-assigned this Feb 11, 2025
@sdeleuze
Copy link
Contributor

@eddumelendez I can probably perform related refinements to unlock future progresses on spring-data-r2dbc side. Just we need to decide which version we target. If you can submit a PR short term on Spring Data side, let's target Spring Framework 6.2, otherwise 7.0. Could you please share your timeline on Spring Data side?

@sdeleuze sdeleuze added the status: waiting-for-feedback We need additional information before we can continue label Feb 11, 2025
@spring-projects-issues
Copy link
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Feb 18, 2025
@eddumelendez
Copy link
Contributor Author

Hi @sdeleuze, sorry for the delay. I can contribute to the spring-data-relational project by the end of the week. However, the issue there was closed because of team capacity and there is a comment in another PR adding a new dialect for the same reason.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue labels Feb 18, 2025
@sdeleuze
Copy link
Contributor

No problem, thanks for your feedback.

@mp911de Could you please let us know what you plan to do on Spring Data side. If you plan to reconsider a related PR, we will do the change on Spring Framework side. If not, we will decline.

@sdeleuze sdeleuze added status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team and removed status: feedback-provided Feedback has been provided labels Feb 18, 2025
@mp911de
Copy link
Member

mp911de commented Feb 19, 2025

I've revisited that topic with the data team. While we would like to broaden support to provide a better dev experience using ClickHouse (i.e. not requiring folks to provide their own config), we are in a situation where we cannot afford to fully maintain another database because of bandwidth on our side. We're barely able to fix some selected bugs.

Another aspect plays into this as well. Having only a R2DBC dialect would be a simpler option than integrating the JDBC side because R2DBC has a smaller feature set. However, if we want to support ClickHouse, it would be required to do the same for the JDBC integration, which is much more complex. ClickHouse comes with all sorts of data types that require proper integration on our side. With that outlook, we have to expect additional feature requests that we would not be able to handle properly resulting in supporting partial database support that is not suitable for modern application usage.

If there is sufficient ask for ClickHouse in the community to run on Spring, I suggest that ClickHouse would host a repository and ship binaries providing the configuration for Framework and Spring Data in the form of dialects and binding markers built on top of already existing SPI.

@sdeleuze
Copy link
Contributor

Thanks @mp911de for the detailed feedback, I will then decline this issue.

@sdeleuze sdeleuze closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2025
@sdeleuze sdeleuze added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team labels Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

5 participants