Skip to content

Commit

Permalink
Format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Pigott committed Dec 1, 2018
1 parent a58a4a5 commit 089cff4
Showing 1 changed file with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public static Schema jdbcToArrowSchema(ResultSetMetaData rsmd, Calendar calendar

Preconditions.checkNotNull(rsmd, "JDBC ResultSetMetaData object can't be null");

final String tz = (calendar != null) ? calendar.getTimeZone().getID() : null;
final String tz = (calendar != null) ? calendar.getTimeZone().getID() : null;

List<Field> fields = new ArrayList<>();
int columnCount = rsmd.getColumnCount();
Expand Down Expand Up @@ -184,8 +184,8 @@ public static Schema jdbcToArrowSchema(ResultSetMetaData rsmd, Calendar calendar
fields.add(new Field(columnName, FieldType.nullable(new ArrowType.Time(TimeUnit.MILLISECOND, 32)), null));
break;
case Types.TIMESTAMP:
fields.add(new Field(columnName, FieldType.nullable(new ArrowType.Timestamp(TimeUnit.MILLISECOND, tz)),
null));
fields.add(new Field(columnName, FieldType.nullable(new ArrowType.Timestamp(TimeUnit.MILLISECOND, tz)),
null));
break;
case Types.BINARY:
case Types.VARBINARY:
Expand Down Expand Up @@ -295,34 +295,34 @@ public static void jdbcToArrowVectors(ResultSet rs, VectorSchemaRoot root, Calen
rs.getString(i), !rs.wasNull(), rowCount);
break;
case Types.DATE:
final Date date;
if (calendar != null) {
date = rs.getDate(i, calendar);
} else {
date = rs.getDate(i);
}

updateVector((DateMilliVector) root.getVector(columnName), date, !rs.wasNull(), rowCount);
final Date date;
if (calendar != null) {
date = rs.getDate(i, calendar);
} else {
date = rs.getDate(i);
}

updateVector((DateMilliVector) root.getVector(columnName), date, !rs.wasNull(), rowCount);
break;
case Types.TIME:
final Time time;
if (calendar != null) {
time = rs.getTime(i, calendar);
} else {
time = rs.getTime(i);
}

updateVector((TimeMilliVector) root.getVector(columnName), time, !rs.wasNull(), rowCount);
final Time time;
if (calendar != null) {
time = rs.getTime(i, calendar);
} else {
time = rs.getTime(i);
}

updateVector((TimeMilliVector) root.getVector(columnName), time, !rs.wasNull(), rowCount);
break;
case Types.TIMESTAMP:
final Timestamp ts;
if (calendar != null) {
ts = rs.getTimestamp(i, calendar);
} else {
ts = rs.getTimestamp(i);
}

// TODO: Need to handle precision such as milli, micro, nano
final Timestamp ts;
if (calendar != null) {
ts = rs.getTimestamp(i, calendar);
} else {
ts = rs.getTimestamp(i);
}

// TODO: Need to handle precision such as milli, micro, nano
updateVector((TimeStampVector) root.getVector(columnName), ts, !rs.wasNull(), rowCount);
break;
case Types.BINARY:
Expand Down

0 comments on commit 089cff4

Please sign in to comment.