You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "Hisoka-X (via GitHub)" <gi...@apache.org> on 2024/04/22 10:22:13 UTC

Re: [PR] [Feature][Doris] Add Doris type converter [seatunnel]

Hisoka-X commented on code in PR #6354:
URL: https://github.com/apache/seatunnel/pull/6354#discussion_r1574171312


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/SaveModePlaceHolder.java:
##########
@@ -23,6 +23,7 @@
 public enum SaveModePlaceHolder {
     ROWTYPE_PRIMARY_KEY("rowtype_primary_key", "primary keys"),
     ROWTYPE_UNIQUE_KEY("rowtype_unique_key", "unique keys"),
+    ROWTYPE_DUPLICATE_KEY("rowtype_duplicate_key", "duplicate keys"),

Review Comment:
   Any doc for `ROWTYPE_DUPLICATE_KEY`?



##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java:
##########
@@ -49,9 +49,16 @@ public enum CommonErrorCode implements SeaTunnelErrorCode {
     WRITE_SEATUNNEL_ROW_ERROR(
             "COMMON-23",
             "<connector> write SeaTunnelRow failed, the SeaTunnelRow value is '<seaTunnelRow>'."),
+
     SQL_TEMPLATE_HANDLED_ERROR(
             "COMMON-24",
-            "The table of <tableName> has no <keyName>, but the template \n <template> \n which has the place holder named <placeholder>. Please use the option named <optionName> to specify sql template");
+            "The table of <tableName> has no <keyName>, but the template \n <template> \n which has the place holder named <placeholder>. Please use the option named <optionName> to specify sql template"),
+
+    PRIMARY_KEY_IS_NECESSARY("COMMON-25", "primary key is necessary"),

Review Comment:
   This one seem like useless.



##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/converter/BasicDataConverter.java:
##########
@@ -183,7 +182,7 @@ default Object[] convertArray(ArrayType typeDefine, Object value)
             return list.toArray();
         }
         if (value instanceof Set) {
-            BasicType elementType = typeDefine.getElementType();
+            SeaTunnelDataType elementType = typeDefine.getElementType();

Review Comment:
   Seem like we missed test case to cover `BasicDataConverter`. cc @hailin0 



-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org