Skip to content

Commit

Permalink
[INLONG-10816][SDK] Transform support Replace function.(apache#10816)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ybszzzziz committed Aug 22, 2024
1 parent c78ba3d commit 4e1d573
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class TestTransformStringFunctionsProcessor {
private static final List<FieldInfo> 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();
Expand Down Expand Up @@ -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";
Expand All @@ -131,7 +131,7 @@ public void testReplaceFunction() throws Exception {
List<String> 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 {
Expand Down Expand Up @@ -199,5 +199,4 @@ public void testTrimFunction() throws Exception {
Assert.assertEquals(output3.get(0), "result=in long");

}

}

0 comments on commit 4e1d573

Please sign in to comment.