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][Jdbc] Add Jdbc default dialect for all jdbc series database without dialect #8132

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

sunxiaojian
Copy link
Contributor

@sunxiaojian sunxiaojian commented Nov 24, 2024

Purpose of this pull request

closed : #7956

Does this PR introduce any user-facing change?

How was this patch tested?

Check list

@sunxiaojian
Copy link
Contributor Author

@Hisoka-X PTAL, The CI error should not be related to this modification

@Hisoka-X
Copy link
Member

@Hisoka-X PTAL, The CI error should not be related to this modification

Please rebase from dev. The error already fixed in #8110

@sunxiaojian
Copy link
Contributor Author

sunxiaojian commented Nov 25, 2024

@Hisoka-X PTAL, The CI error should not be related to this modification

Please rebase from dev. The error already fixed in #8110

@Hisoka-X done, PTAL

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

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

Thanks @sunxiaojian !

user = "mariadb_user"
password = "mariadb_password"

query = "select * from source;"
Copy link
Member

@Hisoka-X Hisoka-X Nov 25, 2024

Choose a reason for hiding this comment

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

I think the generic dialect should support table_path and catalog table too.

Copy link
Member

@Hisoka-X Hisoka-X Nov 25, 2024

Choose a reason for hiding this comment

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

oh. It aleady supported by JdbcCatalogUtils. Please create a test case with only table_path.

Copy link
Contributor Author

@sunxiaojian sunxiaojian Nov 26, 2024

Choose a reason for hiding this comment

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

@Hisoka-X done, PTAL

private static final String MARIADB_SINK = "sink";
private static final String CATALOG_DATABASE = "catalog_database";

private static final List<String> CONFIG_FILE =
Copy link
Member

Choose a reason for hiding this comment

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

Please merge two test case into one class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this necessary?

Copy link
Member

Choose a reason for hiding this comment

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

To save ci time and remove duplicated code.

@@ -31,6 +31,7 @@ public class BasicTypeDefine<T> implements Serializable {
protected String columnType;
// e.g. `varchar` for MySQL
protected String dataType;
protected int sqlType;
Copy link
Member

Choose a reason for hiding this comment

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

I think we can use nativeType instead of sqlType.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can use nativeType instead of sqlType.

no, like 'INT' cannot be converted to standard JDBCType, SQLType doesn't need to worry about this issue

Copy link
Member

Choose a reason for hiding this comment

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

OK, please add some comment to tell devs the sqlType come from jdbc, not come from seatunnel sql type. cc @hailin0

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

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

LGTM if ci passes. Thanks @sunxiaojian

@hailin0 hailin0 merged commit 399eabc into apache:dev Nov 26, 2024
5 checks passed
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.

[Feature][Jdbc] Add Jdbc default dialect for all jdbc series database without dialect
3 participants