From 3915e3658f7733c7e2564a707f2828ddfab8b31f Mon Sep 17 00:00:00 2001 From: ClownXC Date: Sun, 12 May 2024 15:17:15 +0800 Subject: [PATCH] optimize code --- .../common/exception/CommonError.java | 2 +- .../common/exception/CommonErrorCode.java | 16 ++--- .../seatunnel/paimon/utils/RowConverter.java | 71 ++++++++++++------- .../paimon/utils/RowKindConverter.java | 8 +-- .../paimon/utils/RowTypeConverter.java | 38 +++++----- 5 files changed, 73 insertions(+), 62 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 b62d4133912..a1961857fc9 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 @@ -42,8 +42,8 @@ import static org.apache.seatunnel.common.exception.CommonErrorCode.UNSUPPORTED_DATA_TYPE; import static org.apache.seatunnel.common.exception.CommonErrorCode.UNSUPPORTED_DATA_TYPE_SIMPLE; import static org.apache.seatunnel.common.exception.CommonErrorCode.UNSUPPORTED_ENCODING; -import static org.apache.seatunnel.common.exception.CommonErrorCode.VERSION_NOT_SUPPORTED; 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; /** 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 d623a7e301c..5af9d427d27 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 @@ -49,19 +49,17 @@ public enum CommonErrorCode implements SeaTunnelErrorCode { WRITE_SEATUNNEL_ROW_ERROR( "COMMON-23", " write SeaTunnelRow failed, the SeaTunnelRow value is ''."), - SQL_TEMPLATE_HANDLED_ERROR( "COMMON-24", "The table of has no , but the template \n