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

[Feature][Connector-V2] StarRocks Source & Sink connector #3060

Merged
merged 4 commits into from
Oct 18, 2022

Conversation

531651225
Copy link
Contributor

Purpose of this pull request

add StarRocks Connector
#3018

Description

The MySQL Jdbc connector is reused. StarRocks uses the MySQL protocol syntax.
added all datetype in e2e , refer to https://docs.starrocks.io/zh-cn/2.2/sql-reference/sql-statements/data-types/BIGINT

Check list

import java.util.stream.Stream;

@Slf4j
public class JdbcStarRocksdbIT extends TestSuiteBase implements TestResource {
Copy link
Contributor Author

@@ -110,8 +111,12 @@ private void batchInsertData() {
private void initializeJdbcTable() throws SQLException {
try (Connection connection = DriverManager.getConnection(jdbcUrl, jdbcCase.getUserName(), jdbcCase.getPassword())) {
Statement statement = connection.createStatement();
String createDatabase = jdbcCase.getInitDatabase();
String createSource = jdbcCase.getDdlSource();
Copy link
Member

@hailin0 hailin0 Oct 15, 2022

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can include directives to create a database in createSource sql

https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-connp-props-security.html#cj-conn-prop_allowMultiQueries

Thank you for your suggestion. I have fixed it


public class JdbcStarRocksdbIT extends AbstractJdbcIT {

private static final String DOCKER_IMAGE = "d87904488/starrocks-starter:2.2.1";
Copy link
Member

Choose a reason for hiding this comment

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

Can these images be used? It may be more stable

https://hub.docker.com/u/starrocks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can these images be used? It may be more stable

https://hub.docker.com/u/starrocks
The official does not provide a docker image to run. The image is used to compile StarRocks refer to https://docs.starrocks.io/zh-cn/latest/administration/Build_in_docker

Copy link
Member

@EricJoy2048 EricJoy2048 left a comment

Choose a reason for hiding this comment

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

+1

@EricJoy2048 EricJoy2048 changed the title [Feature][Connector-V2] StarRocks connector [Feature][Connector-V2] StarRocks Source & Sink connector Oct 18, 2022
@EricJoy2048 EricJoy2048 merged commit 44ee9a8 into apache:dev Oct 18, 2022
Copy link
Member

@ashulin ashulin left a comment

Choose a reason for hiding this comment

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

LGTM

@CalvinKirs
Copy link
Member

BTW, Usually, if it uses MySQL's protocol, then we don't need to add any IT or UT for this, it doesn't make much sense.

@531651225
Copy link
Contributor Author

BTW, Usually, if it uses MySQL's protocol, then we don't need to add any IT or UT for this, it doesn't make much sense.

thinks,agree with you.

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

Successfully merging this pull request may close these issues.

6 participants