From 4e1d57395606eb8356c9832c2cb089d5cb76e4ea Mon Sep 17 00:00:00 2001 From: Unqyan <2369492695@qq.com> Date: Thu, 22 Aug 2024 11:02:37 +0800 Subject: [PATCH] [INLONG-10816][SDK] Transform support Replace function.(#10816) --- .../process/TestTransformStringFunctionsProcessor.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inlong-sdk/transform-sdk/src/test/java/org/apache/inlong/sdk/transform/process/TestTransformStringFunctionsProcessor.java b/inlong-sdk/transform-sdk/src/test/java/org/apache/inlong/sdk/transform/process/TestTransformStringFunctionsProcessor.java index c544c08594c..fb4acb9e640 100644 --- a/inlong-sdk/transform-sdk/src/test/java/org/apache/inlong/sdk/transform/process/TestTransformStringFunctionsProcessor.java +++ b/inlong-sdk/transform-sdk/src/test/java/org/apache/inlong/sdk/transform/process/TestTransformStringFunctionsProcessor.java @@ -41,6 +41,7 @@ public class TestTransformStringFunctionsProcessor { private static final List dstFields = new ArrayList<>(); private static final CsvSourceInfo csvSource; private static final KvSinkInfo kvSink; + static { for (int i = 1; i < 4; i++) { FieldInfo field = new FieldInfo(); @@ -119,7 +120,6 @@ public void testLocateFunction() throws Exception { Assert.assertEquals(output5.get(0), "result=null"); } - @Test public void testReplaceFunction() throws Exception { String transformSql = "select replace(string1, string2, string3) from source"; @@ -131,7 +131,7 @@ public void testReplaceFunction() throws Exception { List output = processor.transform("hooray|oray|lly", new HashMap<>()); Assert.assertEquals(1, output.size()); Assert.assertEquals(output.get(0), "result=holly"); - + } @Test public void testReplicateFunction() throws Exception { @@ -199,5 +199,4 @@ public void testTrimFunction() throws Exception { Assert.assertEquals(output3.get(0), "result=in long"); } - }