arrow flight sql查询时区问题

Viewed 35

jdbc:
image.png

arrow:
image.png

求助:使用arrow如何使得查出的date类型字段时间正确
flight-sql-jdbc-core 15.0.1 17.0.0都试了

2 Answers

case TIMESTAMPSEC:
if (fieldVector == null || fieldVector.isNull(rowIndex)) {
return null;
}
LocalDateTime localDateTime = (LocalDateTime) fieldVector.getObject(rowIndex);
fieldValue = localDateTime.atZone(ZoneId.from(ZoneOffset.UTC)).withZoneSameInstant(ZoneOffset.ofHours(8)).format(Util.DATETIME_FORMATTER);
break;
自己转一下吧

jdbc:arrow-flight-sql://localhost:32010/?sessionTimeZone=UTC&timeout=60000

URL 加上时区试过了吗