You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/10/31 01:56:00 UTC

[GitHub] [inlong] healchow commented on a diff in pull request #6277: [INLONG-6276][Manager] Fix the problem of passing the ascll code when submitting the sort task

healchow commented on code in PR #6277:
URL: https://github.com/apache/inlong/pull/6277#discussion_r1008974516


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/sort/util/ExtractNodeUtils.java:
##########
@@ -247,7 +247,12 @@ public static PulsarExtractNode createExtractNode(PulsarSource pulsarSource) {
         DataTypeEnum dataType = DataTypeEnum.forName(pulsarSource.getSerializationType());
         switch (dataType) {
             case CSV:
-                format = new CsvFormat(pulsarSource.getDataSeparator());
+                String dataSeparatorStr = pulsarSource.getDataSeparator();
+                if (StringUtils.isNumeric(dataSeparatorStr)) {
+                    char dataSeparator = (char) Integer.parseInt(pulsarSource.getDataSeparator());
+                    dataSeparatorStr = Character.toString(dataSeparator);
+                }
+                format = new CsvFormat(dataSeparatorStr);

Review Comment:
   ```suggestion
                   String separatorStr = pulsarSource.getDataSeparator();
                   if (StringUtils.isNumeric(separatorStr)) {
                       char separator = (char) Integer.parseInt(separatorStr);
                       separatorStr = Character.toString(separator);
                   }
                   format = new CsvFormat(separatorStr);
   ```



-- 
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@inlong.apache.org

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