Skip to content

Commit 089cff4

Browse files
author
Mike Pigott
committed
Format fixes
1 parent a58a4a5 commit 089cff4

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

java/adapter/jdbc/src/main/java/org/apache/arrow/adapter/jdbc/JdbcToArrowUtils.java

+27-27
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public static Schema jdbcToArrowSchema(ResultSetMetaData rsmd, Calendar calendar
133133

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

136-
final String tz = (calendar != null) ? calendar.getTimeZone().getID() : null;
136+
final String tz = (calendar != null) ? calendar.getTimeZone().getID() : null;
137137

138138
List<Field> fields = new ArrayList<>();
139139
int columnCount = rsmd.getColumnCount();
@@ -184,8 +184,8 @@ public static Schema jdbcToArrowSchema(ResultSetMetaData rsmd, Calendar calendar
184184
fields.add(new Field(columnName, FieldType.nullable(new ArrowType.Time(TimeUnit.MILLISECOND, 32)), null));
185185
break;
186186
case Types.TIMESTAMP:
187-
fields.add(new Field(columnName, FieldType.nullable(new ArrowType.Timestamp(TimeUnit.MILLISECOND, tz)),
188-
null));
187+
fields.add(new Field(columnName, FieldType.nullable(new ArrowType.Timestamp(TimeUnit.MILLISECOND, tz)),
188+
null));
189189
break;
190190
case Types.BINARY:
191191
case Types.VARBINARY:
@@ -295,34 +295,34 @@ public static void jdbcToArrowVectors(ResultSet rs, VectorSchemaRoot root, Calen
295295
rs.getString(i), !rs.wasNull(), rowCount);
296296
break;
297297
case Types.DATE:
298-
final Date date;
299-
if (calendar != null) {
300-
date = rs.getDate(i, calendar);
301-
} else {
302-
date = rs.getDate(i);
303-
}
304-
305-
updateVector((DateMilliVector) root.getVector(columnName), date, !rs.wasNull(), rowCount);
298+
final Date date;
299+
if (calendar != null) {
300+
date = rs.getDate(i, calendar);
301+
} else {
302+
date = rs.getDate(i);
303+
}
304+
305+
updateVector((DateMilliVector) root.getVector(columnName), date, !rs.wasNull(), rowCount);
306306
break;
307307
case Types.TIME:
308-
final Time time;
309-
if (calendar != null) {
310-
time = rs.getTime(i, calendar);
311-
} else {
312-
time = rs.getTime(i);
313-
}
314-
315-
updateVector((TimeMilliVector) root.getVector(columnName), time, !rs.wasNull(), rowCount);
308+
final Time time;
309+
if (calendar != null) {
310+
time = rs.getTime(i, calendar);
311+
} else {
312+
time = rs.getTime(i);
313+
}
314+
315+
updateVector((TimeMilliVector) root.getVector(columnName), time, !rs.wasNull(), rowCount);
316316
break;
317317
case Types.TIMESTAMP:
318-
final Timestamp ts;
319-
if (calendar != null) {
320-
ts = rs.getTimestamp(i, calendar);
321-
} else {
322-
ts = rs.getTimestamp(i);
323-
}
324-
325-
// TODO: Need to handle precision such as milli, micro, nano
318+
final Timestamp ts;
319+
if (calendar != null) {
320+
ts = rs.getTimestamp(i, calendar);
321+
} else {
322+
ts = rs.getTimestamp(i);
323+
}
324+
325+
// TODO: Need to handle precision such as milli, micro, nano
326326
updateVector((TimeStampVector) root.getVector(columnName), ts, !rs.wasNull(), rowCount);
327327
break;
328328
case Types.BINARY:

0 commit comments

Comments
 (0)