trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
9.84k stars 2.85k forks source link

Add support for TIME WITH TIME ZONE in H2 query runner #9008

Open ebyhr opened 2 years ago

ebyhr commented 2 years ago

https://github.com/trinodb/trino/blob/master/testing/trino-testing/src/main/java/io/trino/testing/H2QueryRunner.java#L329-L331

H2 added the support in https://github.com/h2database/h2database/pull/2128

TIMESTAMP_WITH_TIME_ZONE in the class has below comment. We should check whether TIME WITH TIME ZONE is fine.

H2 supports TIMESTAMP WITH TIME ZONE via org.h2.api.TimestampWithTimeZone, but it represent only a fixed-offset TZ (not named) This means H2 is unsuitable for testing TIMESTAMP WITH TIME ZONE-bearing queries. Those need to be tested manually.

findepi commented 2 years ago

TIMESTAMP_WITH_TIME_ZONE in the class has below comment. We should check whether TIME WITH TIME ZONE is fine.

we don't allow political zones now in TIMETZ, so H2's implementation should be matching ours (except they support precision up to 9).