presto-main/src/main/java/io/prestosql/sql/analyzer/TypeSignatureTranslator.java/TypeSignatureTranslator/toTypeSignature
class TypeSignatureTranslator:    private static TypeSignature toTypeSignature(DateTimeDataType type)
    {
        boolean withTimeZone = type.isWithTimeZone();

        if (type.getPrecision().isPresent()) {
            throw new PrestoException(NOT_SUPPORTED, String.format("%s type with non-default precision not yet supported", type.getType()));
        }

        switch (type.getType()) {
            case TIMESTAMP:
                if (withTimeZone) {
                    return TIMESTAMP_WITH_TIME_ZONE.getTypeSignature();
                }
                return TIMESTAMP.getTypeSignature();
            case TIME:
                if (withTimeZone) {
                    return TIME_WITH_TIME_ZONE.getTypeSignature();
                }
                return TIME.getTypeSignature();
        }

        throw new UnsupportedOperationException("Unknown dateTime type: " + type.getType());
    }