Marios Trivyzas created FLINK-24426:
---------------------------------------

             Summary: Add support for cast from a string to an INTERVAL
                 Key: FLINK-24426
                 URL: https://issues.apache.org/jira/browse/FLINK-24426
             Project: Flink
          Issue Type: Sub-task
            Reporter: Marios Trivyzas


PostgreSQL allows casts like:

 

{{postgres=# select '2 YEARS 5 month 3 HOURS 10 days 2 mins 6 
seconds'::interval;}}
{{interval}}
{{---------------------------------}}
{{ 2 years 5 mons 10 days 03:02:06}}
{{(1 row)}}

{{postgres=# select '+1 10:17:36.789'::interval;}}
{{ interval }}
{{--------------------}}
{{ 1 day 10:17:36.789}}
{{(1 row)}}

 

We should at least support the latter which is the standard string 
representation of an interval, when the inverse cast from INTERVAL to string is 
used.

 

Oracle on the other hand uses dedicated functions for such conversion: 
*to_dsinterval()*



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to