Skip to content

Commit 26e64c6

Browse files
committed
Reformat code
1 parent d3321d1 commit 26e64c6

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed

flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcDateVectorAccessor.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,14 @@
3030
import java.util.Calendar;
3131
import java.util.concurrent.TimeUnit;
3232
import java.util.function.IntSupplier;
33-
3433
import org.apache.arrow.driver.jdbc.accessor.ArrowFlightJdbcAccessor;
3534
import org.apache.arrow.driver.jdbc.accessor.ArrowFlightJdbcAccessorFactory;
3635
import org.apache.arrow.driver.jdbc.utils.DateTimeUtils;
3736
import org.apache.arrow.vector.DateDayVector;
3837
import org.apache.arrow.vector.DateMilliVector;
3938
import org.apache.arrow.vector.ValueVector;
4039

41-
/**
42-
* Accessor for the Arrow types: {@link DateDayVector} and {@link DateMilliVector}.
43-
*/
40+
/** Accessor for the Arrow types: {@link DateDayVector} and {@link DateMilliVector}. */
4441
public class ArrowFlightJdbcDateVectorAccessor extends ArrowFlightJdbcAccessor {
4542

4643
private final Getter getter;
@@ -50,9 +47,9 @@ public class ArrowFlightJdbcDateVectorAccessor extends ArrowFlightJdbcAccessor {
5047
/**
5148
* Instantiate an accessor for a {@link DateDayVector}.
5249
*
53-
* @param vector an instance of a DateDayVector.
50+
* @param vector an instance of a DateDayVector.
5451
* @param currentRowSupplier the supplier to track the lines.
55-
* @param setCursorWasNull the consumer to set if value was null.
52+
* @param setCursorWasNull the consumer to set if value was null.
5653
*/
5754
public ArrowFlightJdbcDateVectorAccessor(
5855
DateDayVector vector,
@@ -67,7 +64,7 @@ public ArrowFlightJdbcDateVectorAccessor(
6764
/**
6865
* Instantiate an accessor for a {@link DateMilliVector}.
6966
*
70-
* @param vector an instance of a DateMilliVector.
67+
* @param vector an instance of a DateMilliVector.
7168
* @param currentRowSupplier the supplier to track the lines.
7269
*/
7370
public ArrowFlightJdbcDateVectorAccessor(

flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcTimeStampVectorAccessor.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,13 @@
3535
import java.util.TimeZone;
3636
import java.util.concurrent.TimeUnit;
3737
import java.util.function.IntSupplier;
38-
3938
import org.apache.arrow.driver.jdbc.accessor.ArrowFlightJdbcAccessor;
4039
import org.apache.arrow.driver.jdbc.accessor.ArrowFlightJdbcAccessorFactory;
4140
import org.apache.arrow.vector.TimeStampVector;
4241
import org.apache.arrow.vector.types.pojo.ArrowType;
4342
import org.apache.arrow.vector.util.DateUtility;
4443

45-
/**
46-
* Accessor for the Arrow types extending from {@link TimeStampVector}.
47-
*/
44+
/** Accessor for the Arrow types extending from {@link TimeStampVector}. */
4845
public class ArrowFlightJdbcTimeStampVectorAccessor extends ArrowFlightJdbcAccessor {
4946

5047
private final TimeZone timeZone;
@@ -54,16 +51,12 @@ public class ArrowFlightJdbcTimeStampVectorAccessor extends ArrowFlightJdbcAcces
5451
private final Holder holder;
5552
private final boolean isZoned;
5653

57-
/**
58-
* Functional interface used to convert a number (in any time resolution) to LocalDateTime.
59-
*/
54+
/** Functional interface used to convert a number (in any time resolution) to LocalDateTime. */
6055
interface LongToLocalDateTime {
6156
LocalDateTime fromLong(long value);
6257
}
6358

64-
/**
65-
* Instantiate a ArrowFlightJdbcTimeStampVectorAccessor for given vector.
66-
*/
59+
/** Instantiate a ArrowFlightJdbcTimeStampVectorAccessor for given vector. */
6760
public ArrowFlightJdbcTimeStampVectorAccessor(
6861
TimeStampVector vector,
6962
IntSupplier currentRowSupplier,
@@ -148,7 +141,8 @@ private LocalDateTime getLocalDateTime(Calendar calendar) {
148141

149142
LocalDateTime localDateTime = this.longToLocalDateTime.fromLong(value);
150143

151-
// Adjust timestamp to desired calendar (if provided) only if the column includes TZ info, otherwise treat as wall-clock time
144+
// Adjust timestamp to desired calendar (if provided) only if the column includes TZ info,
145+
// otherwise treat as wall-clock time
152146
if (calendar != null && this.isZoned) {
153147
TimeZone timeZone = calendar.getTimeZone();
154148
long millis = this.timeUnit.toMillis(value);

flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcTimeVectorAccessor.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import java.util.Calendar;
2828
import java.util.concurrent.TimeUnit;
2929
import java.util.function.IntSupplier;
30-
3130
import org.apache.arrow.driver.jdbc.ArrowFlightJdbcTime;
3231
import org.apache.arrow.driver.jdbc.accessor.ArrowFlightJdbcAccessor;
3332
import org.apache.arrow.driver.jdbc.accessor.ArrowFlightJdbcAccessorFactory;
@@ -51,9 +50,9 @@ public class ArrowFlightJdbcTimeVectorAccessor extends ArrowFlightJdbcAccessor {
5150
/**
5251
* Instantiate an accessor for a {@link TimeNanoVector}.
5352
*
54-
* @param vector an instance of a TimeNanoVector.
53+
* @param vector an instance of a TimeNanoVector.
5554
* @param currentRowSupplier the supplier to track the lines.
56-
* @param setCursorWasNull the consumer to set if value was null.
55+
* @param setCursorWasNull the consumer to set if value was null.
5756
*/
5857
public ArrowFlightJdbcTimeVectorAccessor(
5958
TimeNanoVector vector,
@@ -68,9 +67,9 @@ public ArrowFlightJdbcTimeVectorAccessor(
6867
/**
6968
* Instantiate an accessor for a {@link TimeMicroVector}.
7069
*
71-
* @param vector an instance of a TimeMicroVector.
70+
* @param vector an instance of a TimeMicroVector.
7271
* @param currentRowSupplier the supplier to track the lines.
73-
* @param setCursorWasNull the consumer to set if value was null.
72+
* @param setCursorWasNull the consumer to set if value was null.
7473
*/
7574
public ArrowFlightJdbcTimeVectorAccessor(
7675
TimeMicroVector vector,
@@ -85,7 +84,7 @@ public ArrowFlightJdbcTimeVectorAccessor(
8584
/**
8685
* Instantiate an accessor for a {@link TimeMilliVector}.
8786
*
88-
* @param vector an instance of a TimeMilliVector.
87+
* @param vector an instance of a TimeMilliVector.
8988
* @param currentRowSupplier the supplier to track the lines.
9089
*/
9190
public ArrowFlightJdbcTimeVectorAccessor(
@@ -101,7 +100,7 @@ public ArrowFlightJdbcTimeVectorAccessor(
101100
/**
102101
* Instantiate an accessor for a {@link TimeSecVector}.
103102
*
104-
* @param vector an instance of a TimeSecVector.
103+
* @param vector an instance of a TimeSecVector.
105104
* @param currentRowSupplier the supplier to track the lines.
106105
*/
107106
public ArrowFlightJdbcTimeVectorAccessor(

flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/utils/SqlTypes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static int getSqlTypeIdFromArrowType(ArrowType arrowType) {
121121
return Types.TIME;
122122
case Timestamp:
123123
String tz = ((ArrowType.Timestamp) arrowType).getTimezone();
124-
if (tz != null){
124+
if (tz != null) {
125125
return Types.TIMESTAMP_WITH_TIMEZONE;
126126
} else {
127127
return Types.TIMESTAMP;

0 commit comments

Comments
 (0)