Skip to content

Commit

Permalink
[BUG][Connector-V2] Fixed conversion exception of elasticsearch array…
Browse files Browse the repository at this point in the history
… format (#5825)
  • Loading branch information
Carl-Zhou-CN authored Nov 10, 2023
1 parent 50fe637 commit 64f19f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ Object convertValue(SeaTunnelDataType<?> fieldType, String fieldValue)
Object arr = Array.newInstance(elementType.getTypeClass(), stringList.size());
for (int i = 0; i < stringList.size(); i++) {
Object convertValue = convertValue(elementType, stringList.get(i));
Array.set(arr, 0, convertValue);
Array.set(arr, i, convertValue);
}
return arr;
} else if (fieldType instanceof MapType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private List<String> generateTestDataSet() throws JsonProcessingException {
Object[] values =
new Object[] {
Collections.singletonMap("key", Short.parseShort(String.valueOf(i))),
new Byte[] {Byte.parseByte("1")},
new Byte[] {Byte.parseByte("1"), Byte.parseByte("2"), Byte.parseByte("3")},
"string",
Boolean.FALSE,
Byte.parseByte("1"),
Expand Down

0 comments on commit 64f19f2

Please sign in to comment.