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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]