Hisoka-X commented on code in PR #8820:
URL: https://github.com/apache/seatunnel/pull/8820#discussion_r1970830745
##########
docs/en/connector-v2/sink/Jdbc.md:
##########
@@ -88,6 +89,10 @@ For example, when using OceanBase database, you need to set
it to 'mysql' or 'or
Postgres 9.5 version or below,please set it to `postgresLow` to support cdc
+### appoint_dialect [string]
Review Comment:
```suggestion
### dialect [string]
```
##########
seatunnel-connectors-v2/connector-jdbc/src/test/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/JdbcDialectLoaderTest.java:
##########
@@ -27,13 +28,22 @@
public class JdbcDialectLoaderTest {
@Test
public void shouldFindGenericDialect() throws Exception {
- JdbcDialect jdbcDialect = JdbcDialectLoader.load("jdbc:someting:", "");
- Assertions.assertTrue(jdbcDialect instanceof GenericDialect);
+ JdbcDialect jdbcDialect = JdbcDialectLoader.load("jdbc:someting:",
null, "");
+ Assertions.assertInstanceOf(GenericDialect.class, jdbcDialect);
}
@Test
public void shouldFindMysqlDialect() throws Exception {
- JdbcDialect jdbcDialect =
JdbcDialectLoader.load("jdbc:mysql://localhost:3306/test", "");
- Assertions.assertTrue(jdbcDialect instanceof MysqlDialect);
+ JdbcDialect jdbcDialect =
+ JdbcDialectLoader.load("jdbc:mysql://localhost:3306/test",
null, "");
+ Assertions.assertInstanceOf(MysqlDialect.class, jdbcDialect);
+ }
+
+ /** Test for {@link JdbcDialectLoader} for appointDialect */
+ @Test
+ public void shouldFindStarRocksDialect() throws Exception {
Review Comment:
```suggestion
public void shouldFindPostgreSQLDialectByDialect() throws Exception {
```
##########
docs/en/connector-v2/sink/Jdbc.md:
##########
@@ -88,6 +89,10 @@ For example, when using OceanBase database, you need to set
it to 'mysql' or 'or
Postgres 9.5 version or below,please set it to `postgresLow` to support cdc
+### appoint_dialect [string]
+
+The appointed dialect, if it does not exist, is still obtained according to
the url, and the priority is higher than the url. For example,when using
starrocks, you need set it to `starrocks`.
Review Comment:
What dialect values can I use?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]