You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcDateVectorAccessor.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -95,7 +95,7 @@ public <T> T getObject(final Class<T> type) throws SQLException {
95
95
} elseif (type == Date.class) {
96
96
value = getObject();
97
97
} else {
98
-
thrownewSQLException("invalid class");
98
+
thrownewSQLException("Object type not supported for Date Vector");
Copy file name to clipboardExpand all lines: flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcTimeStampVectorAccessor.java
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@
32
32
importjava.time.temporal.ChronoUnit;
33
33
importjava.util.Calendar;
34
34
importjava.util.Objects;
35
+
importjava.util.Set;
35
36
importjava.util.TimeZone;
36
37
importjava.util.concurrent.TimeUnit;
37
38
importjava.util.function.IntSupplier;
@@ -81,7 +82,9 @@ public Class<?> getObjectClass() {
81
82
@Override
82
83
public <T> TgetObject(finalClass<T> type) throwsSQLException {
83
84
finalObjectvalue;
84
-
if (type == OffsetDateTime.class) {
85
+
if (!this.isZoned & Set.of(OffsetDateTime.class, ZonedDateTime.class, Instant.class).contains(type)) {
86
+
thrownewSQLException("Vectors without timezones can't be converted to objects with offset/tz info.");
87
+
} elseif (type == OffsetDateTime.class) {
85
88
value = getOffsetDateTime();
86
89
} elseif (type == LocalDateTime.class) {
87
90
value = getLocalDateTime(null);
@@ -92,8 +95,9 @@ public <T> T getObject(final Class<T> type) throws SQLException {
92
95
} elseif (type == Timestamp.class) {
93
96
value = getObject();
94
97
} else {
95
-
thrownewSQLException("invalid class");
98
+
thrownewSQLException("Object type not supported for TimeStamp Vector");
Copy file name to clipboardExpand all lines: flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/impl/calendar/ArrowFlightJdbcTimeVectorAccessor.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -131,7 +131,7 @@ public <T> T getObject(final Class<T> type) throws SQLException {
131
131
} elseif (type == Time.class) {
132
132
value = getObject();
133
133
} else {
134
-
thrownewSQLException("invalid class");
134
+
thrownewSQLException("Object type not supported for Time Vector");
0 commit comments