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

Add CockroachDB connector #8317

Closed
wants to merge 1 commit into from
Closed

Conversation

mosabua
Copy link
Member

@mosabua mosabua commented Jun 18, 2021

Filing this mostly as an fyi

Current status:

  • based on PostgreSQL connector since it supports same JDBC driver
  • plugin code with tests lifted and shifted, all compiles
  • documentation skeleton in place
  • integration into server package done
  • server with catalog file starts

Todo:

  • test manually
  • try to run tests and chip away until all passes
  • improve docs until I am happy
  • get it to a stage where maintainers are happy to merge as alpha version

@cla-bot cla-bot bot added the cla-signed label Jun 18, 2021
@mosabua mosabua self-assigned this Jun 18, 2021
@mosabua mosabua marked this pull request as draft June 18, 2021 19:51
@mosabua
Copy link
Member Author

mosabua commented Jun 18, 2021

And not surprisingly .. there are test failures in the module on the GA build..

import static java.util.Objects.requireNonNull;
import static java.util.stream.Collectors.joining;

public class CockroachDbClient
Copy link
Member

Choose a reason for hiding this comment

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

Separate verbatim copy and mechanical renames from any other changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry.. what do you mean here?

Copy link
Member

Choose a reason for hiding this comment

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

Most of this code seem to be a copy of PostgreSQL connector code and so there is no point in reviewing that again.
Most -- but not all. It would be good separate "copy" from "mechanical changes (renames)" and "any other changes", so that it's reviewable.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could treat postgresql connector as a library? instead of copying

Copy link
Member

Choose a reason for hiding this comment

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

Let's see what are actual modifications. I would assume PostgreSQL and Cockroach not to converge in the future.

Copy link
Member Author

Choose a reason for hiding this comment

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

I only used PostgreSQL connector as starting point since I know that CockroachDB is compatible and uses the PostgreSQL JDBC driver. I fully expect to change this code quite a bit to adjust to CockroachDB. It just provided a better starting point than a clean slate. My plan is to test it manually to see how far I get, then get the testcontainer setup to work and slowly work my way through all the tests and adjust as needed. It will only then make sense to really review.. hence the PR in draft..

- based on PostgreSQL connector since it supports same JDBC driver
- plugin code with tests
- documentation
- integration into server package
@ebyhr
Copy link
Member

ebyhr commented May 10, 2022

@mosabua Are you still working on this?

@mosabua
Copy link
Member Author

mosabua commented May 10, 2022

Would love to but havent had time since the initial stab .. feel free to take it over

@mosabua
Copy link
Member Author

mosabua commented Sep 19, 2022

I am closing this PR since I wont have time to drive this further any time soon. Anybody please feel free to take this work and build upon it to get CockroachDB connector off the ground. I will keep my branch and potentially work on it again but there is no ETA and there should be no expectation that I can drive this further.

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

Successfully merging this pull request may close these issues.

4 participants