in flight/flight-sql-jdbc-core/src/main/java/org/apache/arrow/driver/jdbc/accessor/ArrowFlightJdbcAccessor.java [223:249]
public <T> T getObject(final Class<T> type) throws SQLException {
final Object value;
if (type == Byte.class) {
value = getByte();
} else if (type == Short.class) {
value = getShort();
} else if (type == Integer.class) {
value = getInt();
} else if (type == Long.class) {
value = getLong();
} else if (type == Float.class) {
value = getFloat();
} else if (type == Double.class) {
value = getDouble();
} else if (type == Boolean.class) {
value = getBoolean();
} else if (type == BigDecimal.class) {
value = getBigDecimal();
} else if (type == String.class) {
value = getString();
} else if (type == byte[].class) {
value = getBytes();
} else {
value = getObject();
}
return !type.isPrimitive() && wasNull ? null : type.cast(value);
}