This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 0c0e5f978 [Improve][Connector-V2][Doris]Remove serialization code that 
is no longer used (#4313)
0c0e5f978 is described below

commit 0c0e5f978e54283b20878fc73bef08d299d0fe0f
Author: yongkang.zhong <[email protected]>
AuthorDate: Thu Mar 9 18:04:46 2023 +0800

    [Improve][Connector-V2][Doris]Remove serialization code that is no longer 
used (#4313)
---
 .../connectors/doris/serialize/DorisSinkOP.java    | 32 ----------------------
 .../doris/serialize/SeaTunnelRowSerializer.java    |  3 +-
 2 files changed, 1 insertion(+), 34 deletions(-)

diff --git 
a/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/serialize/DorisSinkOP.java
 
b/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/serialize/DorisSinkOP.java
deleted file mode 100644
index 223be8cae..000000000
--- 
a/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/serialize/DorisSinkOP.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.seatunnel.connectors.doris.serialize;
-
-import org.apache.seatunnel.api.table.type.RowKind;
-
-public class DorisSinkOP {
-    public static String parseDeleteSign(RowKind rowKind) {
-        if (RowKind.INSERT.equals(rowKind) || 
RowKind.UPDATE_AFTER.equals(rowKind)) {
-            return "0";
-        } else if (RowKind.DELETE.equals(rowKind) || 
RowKind.UPDATE_BEFORE.equals(rowKind)) {
-            return "1";
-        } else {
-            throw new IllegalArgumentException("Unrecognized row kind:" + 
rowKind.toString());
-        }
-    }
-}
diff --git 
a/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/serialize/SeaTunnelRowSerializer.java
 
b/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/serialize/SeaTunnelRowSerializer.java
index a0492d28e..4bfc148d8 100644
--- 
a/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/serialize/SeaTunnelRowSerializer.java
+++ 
b/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/serialize/SeaTunnelRowSerializer.java
@@ -77,8 +77,7 @@ public class SeaTunnelRowSerializer extends 
SeaTunnelRowConverter implements Dor
             rowMap.put(seaTunnelRowType.getFieldName(i), value);
         }
         if (enableDelete) {
-            rowMap.put(
-                    LoadConstants.DORIS_DELETE_SIGN, 
DorisSinkOP.parseDeleteSign(row.getRowKind()));
+            rowMap.put(LoadConstants.DORIS_DELETE_SIGN, 
parseDeleteSign(row.getRowKind()));
         }
         return objectMapper.writeValueAsString(rowMap);
     }

Reply via email to