Add "instant" Trino type
Author: findepiCreated Dec 14, 2019Updated Sep 18, 2026
Labelsenhancement
Some storage systems Trino connects to have a way store a point in time (instant), without time zone.
In Java, this would correspond to java.time.Instant.
Examples:
- PostgreSQL's
TIMESTAMP WITH TIME ZONE - Cassandra's
TIMESTAMP - Teradata's
TIMESTAMP - Iceberg's
timestamptz
Benefits
Today, we should map these to
TIMESTAMP WITH TIME ZONEin Trino (because it can store a point in time), filling the zone with UTC. If we implement "instant" type in Trino, we could map these to Trino without pretending zone was stored.Also, mapping to "instant" would help with
INSERTs -- clearly indicating that there is no way to store a zone in the underlying storage.planning queries.
TIMESTAMP WITH TIME ZONEzone-related behavior prevents predicates simplification/pushdown.- e.g. this is currently addressed for Iceberg by doing optimizations on the connector side
- this can be solved alternatively by letting the connectors declare zone which all the
TIMESTAMP WITH TIME ZONEvalues are in
Source: trinodb/trino