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][SQL Config] Add SQL config adapter #6757
Conversation
...dbc-e2e/connector-jdbc-e2e-part-1/src/test/resources/jdbc_mysql_source_and_sink_parallel.sql
Outdated
Show resolved
Hide resolved
...nnector-jdbc-e2e/connector-jdbc-e2e-part-1/src/test/resources/jdbc_mysql_source_and_sink.sql
Outdated
Show resolved
Hide resolved
docs/zh/concept/sql-config.md
Outdated
useSSL = false, | ||
rewriteBatchedStatements = true | ||
}', | ||
'type'='source' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move type
to connector
after
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
# Conflicts: # docs/en/connector-v2/sink/Doris.md
# Conflicts: # seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigBuilder.java # seatunnel-core/seatunnel-spark-starter/seatunnel-spark-2-starter/src/main/java/org/apache/seatunnel/core/starter/spark/SparkStarter.java # seatunnel-core/seatunnel-spark-starter/seatunnel-spark-starter-common/src/main/java/org/apache/seatunnel/core/starter/spark/SparkStarter.java
docs/en/concept/sql-config.md
Outdated
``` | ||
|
||
* The `SELECT` part directly uses the name of the source-mapped table, indicating that all data from the source table will be inserted into the target table. | ||
* sing this syntax does not generate related `transform` configurations. This syntax is generally used in multi-table synchronization scenarios. For example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first letter needs to be capitalized.
sinkConfig.setConnector(connector); | ||
// original sink table without source_table_name | ||
options.remove(OPTION_SOURCE_TABLE_NAME_KEY); | ||
// String sourceTableName = options.get(OPTION_SOURCE_TABLE_NAME_KEY); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove useless code.
@@ -177,12 +177,26 @@ public SeaTunnelDataType<?> getExpressionType(Expression expression) { | |||
SeaTunnelDataType<?> leftType = getExpressionType(binaryExpression.getLeftExpression()); | |||
SeaTunnelDataType<?> rightType = | |||
getExpressionType(binaryExpression.getRightExpression()); | |||
if (leftType.getSqlType() == SqlType.INT && rightType.getSqlType() == SqlType.INT) { | |||
if ((leftType.getSqlType() == SqlType.TINYINT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some test case for this to cover all the logical?
if ((leftType.getSqlType() == SqlType.INT || leftType.getSqlType() == SqlType.BIGINT) | ||
&& (rightType.getSqlType() == SqlType.INT | ||
|| rightType.getSqlType() == SqlType.BIGINT)) { | ||
if ((leftType.getSqlType() == SqlType.TINYINT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Purpose of this pull request
[Feature][SQL Config] Add SQL config adapter
Does this PR introduce any user-facing change?
How was this patch tested?
Check list
New License Guide
release-note
.