Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/5218#discussion_r159128212
--- Diff:
flink-core/src/test/java/org/apache/flink/types/parser/FieldParserTest.java ---
@@ -43,4 +43,38 @@ public void testEndsWithDelimiter() throws Exception {
assertFalse(FieldParser.endsWithDelimiter(bytes, 3, delim));
}
+ @Test
+ public void testNextStringEndPos() throws Exception {
--- End diff --
It would be good if the test would cover more corner cases for
`nextStringEndPos()`, such as
- multi-char delimiter
- field with trailing delimiter
- field without training delimiter
- empty field
For example with test date like this
```
byte[] bytes1 = "field1|#|field2".getBytes();
byte[] bytes2 = "field3|#|".getBytes();
byte[] delim = "|#|".getBytes();
```
---