Skip to content

Commit

Permalink
[INLONG-11028][SDK] Transform SQL support UrlEncode & UrlDecode funct…
Browse files Browse the repository at this point in the history
…ions

fixed UT null bug
  • Loading branch information
MOONSakura0614 committed Oct 11, 2024
1 parent 0313082 commit 70b2955
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void testUrlDecodeFunction() throws Exception {
TransformProcessor<String, String> processor2 = TransformProcessor
.create(config2, SourceDecoderFactory.createCsvDecoder(csvSource),
SinkEncoderFactory.createKvEncoder(kvSink));
// case2: url_decode(null) -> null
// case2: url_decode(null)
List<String> output2 = processor2.transform("|apple|banana|cloud|1", new HashMap<>());
Assert.assertEquals(1, output2.size());
Assert.assertEquals(output2.get(0), "result=");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public void testUrlEncodeFunction() throws Exception {
TransformProcessor<String, String> processor2 = TransformProcessor
.create(config2, SourceDecoderFactory.createCsvDecoder(csvSource),
SinkEncoderFactory.createKvEncoder(kvSink));
// case2: url_encode(null) -> null
// case2: url_encode(null)
List<String> output2 = processor2.transform("apple|banana|cloud|1", new HashMap<>());
Assert.assertEquals(1, output2.size());
Assert.assertEquals(output2.get(0), "result=null");
Assert.assertEquals(output2.get(0), "result=");
}
}

0 comments on commit 70b2955

Please sign in to comment.