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

[TASK][EASY] JDBC Engine supports StarRocks #5404

Closed
2 of 3 tasks
banmoy opened this issue Oct 11, 2023 · 21 comments
Closed
2 of 3 tasks

[TASK][EASY] JDBC Engine supports StarRocks #5404

banmoy opened this issue Oct 11, 2023 · 21 comments
Assignees

Comments

@banmoy
Copy link

banmoy commented Oct 11, 2023

Code of Conduct

Search before creating

  • I have searched in the task list and found no similar tasks.

Mentor

  • I have sufficient knowledge and experience of this task, and I volunteer to be the mentor of this task to guide contributors to complete the task.

Skill requirements

  • Basic knowledge of Scala programming language
  • Basic knowledge of JDBC concepts
  • Basic knowledge of Docker and Testcontianers

Background and Goals

Currently, Kyuubi supports JDBC engines with limited dialects, and we can extend the dialects to support StarRocks, which is an open-source and high-performance analytical database.

Reference https://www.bilibili.com/video/BV1UT411m7LR

Implementation steps

  • Implement a StarRocks dialect in the JDBC engine
  • Leverage the Testcontainers to add integration tests
  • Update document correspondingly

Additional context

No response

@github-actions
Copy link

Hello @banmoy,
Thanks for finding the time to report the issue!
We really appreciate the community's efforts to improve Apache Kyuubi.

@banmoy
Copy link
Author

banmoy commented Oct 11, 2023

@pan3793 could you help to evaluate whether this issue can be added to the task list of Code Contribution Program? Thanks

@pan3793
Copy link
Member

pan3793 commented Oct 11, 2023

@banmoy thanks, task was added to the list

@banmoy
Copy link
Author

banmoy commented Oct 11, 2023

Thanks a lot 😃

@pan3793
Copy link
Member

pan3793 commented Oct 11, 2023

@banmoy would you like to complete it by yourself, or leave it to other contributors?

@banmoy
Copy link
Author

banmoy commented Oct 11, 2023

@pan3793 could first leave it to other contributors if they are interested in it

@bowenliang123
Copy link
Contributor

bowenliang123 commented Oct 11, 2023

Thanks for raising this task. We could split the task into several smaller subtasks to accomplish.
You could be assigned to this task first, and submit the relevant PR to it. @banmoy
Will try to help if there's somewhere you need a hand or review.

@bowenliang123
Copy link
Contributor

Btw, consider using the official docker image from StarRocks for testing, which could be helpful and easy to maintain.
refer : https://docs.starrocks.io/en-us/latest/quick_start/deploy_with_docker

@phionex0571
Copy link

phionex0571 commented Oct 12, 2023

@pan3793 Hello, I have strong interests on it and during my daily work, Apache Kyuubi and StarRocks are two most useful tools. I think it can be finished in 14 days! please aisgn it to me~thx

@pan3793
Copy link
Member

pan3793 commented Oct 12, 2023

@phionex0571 Emm... you have been assigned 2 tasks, do you have sufficient free time to take the third and complete them in parallel?

@bowenliang123
Copy link
Contributor

bowenliang123 commented Oct 12, 2023

@banmoy Can I assign this task to you , and you can guide and cooperate with @phionex0571 ? In order to maximize the common knowledge from individuals and professionalism from SR team.

@phionex0571
Copy link

@phionex0571 Emm... you have been assigned 2 tasks, do you have sufficient free time to take the third and complete them in parallel?

@pan3793 Yeeep, in the previous year, I'd finished a StarRocks proxy in Apache Kyuubi 1.4, but that was not elegant and that was imitated like Apache Doris Engine implementation in Apache Kyuubi. And it's applied by 3 applications in production environment of my company. I hold strong belief that I'm able to finish this issue in time.

@banmoy
Copy link
Author

banmoy commented Oct 12, 2023

I'm not sure I could start the work ASAP. I think the task can be assigned to other contributors first if they have big interests in it. I'm also glad to provide the knowledge of StarRocks if needed in discussion, review or test. WDYT? @bowenliang123

@bowenliang123
Copy link
Contributor

Let's assign this task to both @phionex0571 @banmoy first.
Please raise the subtasks for this task. Small subtasks and improvements are always welcomed.
@phionex0571 please feel free to ask @banmoy about details of StartRocks, since he is from StarRocks team and has professionalism in Spark/Flink connector as well.

Also cc @zhaomin1423, the original contributor of the JDBC engine. They may need some guidance for this task.

Thanks to all.

@zhaomin1423
Copy link
Member

zhaomin1423 commented Oct 12, 2023

Let's assign this task to both @phionex0571 @banmoy first. Please raise the subtasks for this task. Small subtasks and improvements are always welcomed. @phionex0571 please feel free to ask @banmoy about details of StartRocks, since he is from StarRocks team and has professionalism in Spark/Flink connector as well.

Also cc @zhaomin1423, the original contributor of the JDBC engine. They may need some guidance for this task.

Thanks to all.

Thanks you all, StarRocks is excellent and used widely, look forward.

@phionex0571
Copy link

phionex0571 commented Oct 25, 2023

@bowenliang123 @banmoy Hi, I've finished almost all the coding work and I have a question about StarRocks version in test cases. There're
several versions of StarRocks and which one should I choose to design unit tests, is it reasonable to use StarRocks 2.5.13? or 3.x?

@bowenliang123
Copy link
Contributor

The latest stable released version of StarRocks is 3.1.x, which is reasonable to be tested with.
And feel free to raise the PR, even not unfinished. Just remember to mark the PR in the draft status.
By running CI tests, the failing tests and fixes bring it to more mutual.

@banmoy
Copy link
Author

banmoy commented Oct 26, 2023

@phionex0571 Is it possible to make the unit tests run against the latest several StarRocks versions, such as 2.5, 3.0, and 3.1? So that we can tell users in the doc which version of StarRocks is supported, just like Spark/Flink/Trino? I think test cases should be same among different versions, but just use the specific docker image for each version.

@bowenliang123
Copy link
Contributor

bowenliang123 commented Oct 26, 2023

@banmoy It's not suggested to tested on multiple versions of StarRocks. As for other engines for Spark/Flink/Trino, we tested on different matrix combinations as Kyuubi use different version of API on these engines and has dedicated engine implementation and adaptations.
But as StarRocks introduced no major FE feature or breaking changes in MySQL protocol or dialect between 2.x and 3.x, and the JDBC engine uses the same version of Mysql Driver for connection, it's reasonable to test only on the latest stable version.

@banmoy
Copy link
Author

banmoy commented Nov 27, 2023

@phionex0571 Hi, is there any progress on this task?

@bowenliang123
Copy link
Contributor

@banmoy StarRocks support of dialects/connection/tests in the JDBC engine has been introduced in PR 5882 (#5882), if you may be concerned. Have check or validation on it.

zhaohehuhu pushed a commit to zhaohehuhu/incubator-kyuubi that referenced this issue Mar 21, 2024
# 🔍 Description
## Issue References 🔗

This pull request fixes apache#5404

## Describe Your Solution 🔧

- Introduce StarRocks support in JDBC Engine
- Adding dialects and tests for StarRocks
- Tested with StarRocks 3.x official open-sourced version docker image, with a mini cluster with FE and BE setup.

## Types of changes 🔖

- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Test Plan 🧪

#### Behavior Without This Pull Request ⚰️

#### Behavior With This Pull Request 🎉
Supported StarRocks in JDBC engine.

#### Related Unit Tests
Add tests of `StarRocksOperationSuite`, `StarRocksOperationWithEngineSuite`, `StarRocksSessionSuite` and `StarRocksStatementSuite`.

---

# Checklists
## 📝 Author Self Checklist

- [x] My code follows the [style guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html) of this project
- [x] I have performed a self-review
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)

## 📝 Committer Pre-Merge Checklist

- [ ] Pull request title is okay.
- [ ] No license issues.
- [ ] Milestone correctly set?
- [ ] Test coverage is ok
- [ ] Assignees are selected.
- [ ] Minimum number of approvals
- [ ] No changes are requested

**Be nice. Be informative.**

Closes apache#5882 from bowenliang123/jdbc-sr.

Closes apache#5404

54927d3 [Bowen Liang] update
5b1bbf7 [Bowen Liang] update doc
f01da74 [Bowen Liang] update StarRocksStatementSuite
1018bc9 [Bowen Liang] MySQL8ConnectionProvider
59cba95 [Bowen Liang] simplify StarRocksDialect
4bf55bb [Bowen Liang] simplify StarRocksTRowSetGenerator
c857224 [Bowen Liang] jdbc starrocks

Authored-by: Bowen Liang <liangbowen@gf.com.cn>
Signed-off-by: Bowen Liang <liangbowen@gf.com.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

5 participants