This is an automated email from the ASF dual-hosted git repository.
wanghailin pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new ba7f5c9e30 [Improve][Connector-V2] Fix the word misspellings for
paimon connector (#9332)
ba7f5c9e30 is described below
commit ba7f5c9e30a2d49b73f13a66a89472f126554d9b
Author: dailai <[email protected]>
AuthorDate: Wed May 21 14:40:13 2025 +0800
[Improve][Connector-V2] Fix the word misspellings for paimon connector
(#9332)
---
.../org/apache/seatunnel/common/exception/CommonError.java | 10 +++++-----
.../org/apache/seatunnel/common/exception/CommonErrorCode.java | 6 +++---
.../connectors/seatunnel/paimon/utils/RowConverter.java | 2 +-
.../connectors/seatunnel/paimon/utils/RowConverterTest.java | 2 +-
.../apache/seatunnel/e2e/connector/paimon/PaimonSinkCDCIT.java | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git
a/seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonError.java
b/seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonError.java
index 2ec8045cf0..f190bd42bc 100644
---
a/seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonError.java
+++
b/seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonError.java
@@ -48,7 +48,7 @@ import static
org.apache.seatunnel.common.exception.CommonErrorCode.UNSUPPORTED_
import static
org.apache.seatunnel.common.exception.CommonErrorCode.UNSUPPORTED_ROW_KIND;
import static
org.apache.seatunnel.common.exception.CommonErrorCode.VERSION_NOT_SUPPORTED;
import static
org.apache.seatunnel.common.exception.CommonErrorCode.WRITE_SEATUNNEL_ROW_ERROR;
-import static
org.apache.seatunnel.common.exception.CommonErrorCode.WRITE_SEATUNNEL_ROW_ERROR_WITH_FILEDS_NOT_MATCH;
+import static
org.apache.seatunnel.common.exception.CommonErrorCode.WRITE_SEATUNNEL_ROW_ERROR_WITH_FIELDS_NOT_MATCH;
import static
org.apache.seatunnel.common.exception.CommonErrorCode.WRITE_SEATUNNEL_ROW_ERROR_WITH_SCHEMA_INCOMPATIBLE_SCHEMA;
/**
@@ -254,25 +254,25 @@ public class CommonError {
public static SeaTunnelRuntimeException
writeRowErrorWithSchemaIncompatibleSchema(
String connector,
String sourceFieldSqlSchema,
- String exceptFieldSqlSchema,
+ String expectedFieldSqlSchema,
String sinkFieldSqlSchema) {
Map<String, String> params = new HashMap<>();
params.put("connector", connector);
params.put("sourceFieldSqlSchema", sourceFieldSqlSchema);
- params.put("exceptFieldSqlSchema", exceptFieldSqlSchema);
+ params.put("expectedFieldSqlSchema", expectedFieldSqlSchema);
params.put("sinkFieldSqlSchema", sinkFieldSqlSchema);
return new SeaTunnelRuntimeException(
WRITE_SEATUNNEL_ROW_ERROR_WITH_SCHEMA_INCOMPATIBLE_SCHEMA,
params);
}
- public static SeaTunnelRuntimeException
writeRowErrorWithFiledsCountNotMatch(
+ public static SeaTunnelRuntimeException
writeRowErrorWithFieldsCountNotMatch(
String connector, int sourceFieldsNum, int sinkFieldsNum) {
Map<String, String> params = new HashMap<>();
params.put("connector", connector);
params.put("sourceFieldsNum", String.valueOf(sourceFieldsNum));
params.put("sinkFieldsNum", String.valueOf(sinkFieldsNum));
return new SeaTunnelRuntimeException(
- WRITE_SEATUNNEL_ROW_ERROR_WITH_FILEDS_NOT_MATCH, params);
+ WRITE_SEATUNNEL_ROW_ERROR_WITH_FIELDS_NOT_MATCH, params);
}
public static SeaTunnelRuntimeException formatDateTimeError(String
datetime, String field) {
diff --git
a/seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java
b/seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java
index 1082c7c429..9bbe72fe24 100644
---
a/seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java
+++
b/seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java
@@ -65,11 +65,11 @@ public enum CommonErrorCode implements SeaTunnelErrorCode {
WRITE_SEATUNNEL_ROW_ERROR_WITH_SCHEMA_INCOMPATIBLE_SCHEMA(
"COMMON-30",
- "<connector>: The source filed with schema
'<sourceFieldSqlSchema>', except filed schema of sink is
'<exceptFieldSqlSchema>'; but the filed in sink table which actual schema is
'<sinkFieldSqlSchema>'. Please check schema of sink table."),
+ "'<connector>': The source field with schema
'<sourceFieldSqlSchema>', expected field schema of sink is
'<expectedFieldSqlSchema>'; whose actual schema in the sink table is
'<sinkFieldSqlSchema>'. Please check schema of sink table."),
- WRITE_SEATUNNEL_ROW_ERROR_WITH_FILEDS_NOT_MATCH(
+ WRITE_SEATUNNEL_ROW_ERROR_WITH_FIELDS_NOT_MATCH(
"COMMON-31",
- "<connector>: The source has '<sourceFieldsNum>' fields, but the
table of sink has '<sinkFieldsNum>' fields. Please check schema of sink
table."),
+ "'<connector>': The source has '<sourceFieldsNum>' fields, but the
table of sink has '<sinkFieldsNum>' fields. Please check schema of sink
table."),
FORMAT_DATE_ERROR(
"COMMON-32",
"The date format '<date>' of field '<field>' is not supported.
Please check the date format."),
diff --git
a/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowConverter.java
b/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowConverter.java
index 06f91efcd1..8415f752e3 100644
---
a/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowConverter.java
+++
b/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowConverter.java
@@ -361,7 +361,7 @@ public class RowConverter {
List<DataField> sinkTotalFields = sinkTableSchema.fields();
int sourceTotalFields = seaTunnelRowType.getTotalFields();
if (sourceTotalFields != sinkTotalFields.size()) {
- throw CommonError.writeRowErrorWithFiledsCountNotMatch(
+ throw CommonError.writeRowErrorWithFieldsCountNotMatch(
"Paimon", sourceTotalFields, sinkTotalFields.size());
}
BinaryRow binaryRow = new BinaryRow(sourceTotalFields);
diff --git
a/seatunnel-connectors-v2/connector-paimon/src/test/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowConverterTest.java
b/seatunnel-connectors-v2/connector-paimon/src/test/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowConverterTest.java
index 605c54ad1e..c50df02435 100644
---
a/seatunnel-connectors-v2/connector-paimon/src/test/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowConverterTest.java
+++
b/seatunnel-connectors-v2/connector-paimon/src/test/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowConverterTest.java
@@ -293,7 +293,7 @@ public class RowConverterTest {
RowConverter.reconvert(
seaTunnelRow, seaTunnelRowType,
sinkTableSchema));
SeaTunnelRuntimeException filedNumsExceptException =
- CommonError.writeRowErrorWithFiledsCountNotMatch(
+ CommonError.writeRowErrorWithFieldsCountNotMatch(
"Paimon",
seaTunnelRowType.getTotalFields(),
sinkTableSchema.fields().size());
diff --git
a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-paimon-e2e/src/test/java/org/apache/seatunnel/e2e/connector/paimon/PaimonSinkCDCIT.java
b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-paimon-e2e/src/test/java/org/apache/seatunnel/e2e/connector/paimon/PaimonSinkCDCIT.java
index 9e2af9bd4e..540fa90269 100644
---
a/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-paimon-e2e/src/test/java/org/apache/seatunnel/e2e/connector/paimon/PaimonSinkCDCIT.java
+++
b/seatunnel-e2e/seatunnel-connector-v2-e2e/connector-paimon-e2e/src/test/java/org/apache/seatunnel/e2e/connector/paimon/PaimonSinkCDCIT.java
@@ -148,7 +148,7 @@ public class PaimonSinkCDCIT extends AbstractPaimonIT
implements TestResource {
errResult
.getStderr()
.contains(
- "[Paimon: The source filed with schema 'name
INT', except filed schema of sink is '`name` INT'; but the filed in sink table
which actual schema is '`name` STRING'. Please check schema of sink table.]"));
+ "['Paimon': The source field with schema 'name
INT', expected field schema of sink is '`name` INT'; whose actual schema in the
sink table is '`name` STRING'. Please check schema of sink table.]"));
}
@TestTemplate