DBZ-1969 Update convertLtreeArray to handle List instances

This commit is contained in:
Braden Groom 2020-04-29 09:22:05 -07:00 committed by Chris Cranford
parent 1578ebc8bb
commit 284a4357e0
2 changed files with 8 additions and 3 deletions

View File

@ -542,6 +542,14 @@ private Object convertLtreeArray(Column column, Field fieldDefn, Object data) {
List<String> ltrees = Arrays.asList(s.split(","));
r.deliver(ltrees);
}
else if (data instanceof List) {
List<Object> list = (List<Object>) data;
List<String> ltrees = new ArrayList<>(list.size());
for (Object value : list) {
ltrees.add(value.toString());
}
r.deliver(ltrees);
}
else if (data instanceof PgArray) {
PgArray pgArray = (PgArray) data;
try {

View File

@ -278,9 +278,6 @@ public boolean isArray(PostgresType type) {
case PgOid.INT8RANGE_ARRAY:
return true;
default:
if (TypeRegistry.TYPE_NAME_LTREE_ARRAY.equals(type.getName())) {
return false;
}
return type.isArrayType();
}
}