From b66102cfcb9f7cfe38652e98954db3c22353df7a Mon Sep 17 00:00:00 2001 From: ChunLiang Lu Date: Tue, 17 Dec 2024 15:04:48 +0800 Subject: [PATCH] [INLONG-11606][Sort] When formatting string field values, the original value is not modified (#11607) --- .../pojo/sort/dataflow/field/format/StringFormatInfo.java | 2 +- .../pojo/sort/dataflow/field/format/VarCharFormatInfo.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/field/format/StringFormatInfo.java b/inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/field/format/StringFormatInfo.java index c249b334860..3a23ac594b6 100644 --- a/inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/field/format/StringFormatInfo.java +++ b/inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/field/format/StringFormatInfo.java @@ -38,7 +38,7 @@ public String serialize(String obj) { @Override public String deserialize(String text) { - return text.trim(); + return text; } @Override diff --git a/inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/field/format/VarCharFormatInfo.java b/inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/field/format/VarCharFormatInfo.java index ac5694bb9c7..3b0ac25c67b 100644 --- a/inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/field/format/VarCharFormatInfo.java +++ b/inlong-common/src/main/java/org/apache/inlong/common/pojo/sort/dataflow/field/format/VarCharFormatInfo.java @@ -52,7 +52,7 @@ public String serialize(String obj) { @Override public String deserialize(String text) { - return text.trim(); + return text; } @Override