src/main/java/org/embulk/input/postgresql/getter/PostgreSQLColumnGetterFactory.java in embulk-input-postgresql-0.8.5 vs src/main/java/org/embulk/input/postgresql/getter/PostgreSQLColumnGetterFactory.java in embulk-input-postgresql-0.8.6
- old
+ new
@@ -25,10 +25,14 @@
if (column.getTypeName().equals("hstore") && getToType(option) == Types.JSON) {
// converting hstore to json needs a special handling
return new HstoreToJsonColumnGetter(to, Types.JSON);
}
+ if (column.getSqlType() == java.sql.Types.ARRAY) {
+ return new ArrayColumnGetter(to, getToType(option));
+ }
+
ColumnGetter getter = super.newColumnGetter(con, task, column, option);
// incremental loading wrapper
switch (column.getTypeName()) {
case "timestamptz":
@@ -46,10 +50,11 @@
switch(column.getTypeName()) {
case "json":
case "jsonb":
return "json";
case "hstore":
- // hstore is converted to string by default
+ case "array":
+ // array & hstore is converted to string by default
return "string";
default:
return super.sqlTypeToValueType(column, sqlType);
}
}