Maxim Gekk created SPARK-29406:
----------------------------------

             Summary: Interval output styles
                 Key: SPARK-29406
                 URL: https://issues.apache.org/jira/browse/SPARK-29406
             Project: Spark
          Issue Type: Sub-task
          Components: SQL
    Affects Versions: 3.0.0
            Reporter: Maxim Gekk


The output format of the interval type can be set to one of the four styles 
sql_standard, postgres, postgres_verbose, or iso_8601, using the command SET 
intervalstyle, see
 
[https://www.postgresql.org/docs/11/datatype-datetime.html#DATATYPE-INTERVAL-OUTPUT]
||Style Specification||Year-Month Interval||Day-Time Interval||Mixed Interval||
|{{sql_standard}}|1-2|3 4:05:06|-1-2 +3 -4:05:06|
|{{postgres}}|1 year 2 mons|3 days 04:05:06|-1 year -2 mons +3 days -04:05:06|
|{{postgres_verbose}}|@ 1 year 2 mons|@ 3 days 4 hours 5 mins 6 secs|@ 1 year 2 
mons -3 days 4 hours 5 mins 6 secs ago|
|{{iso_8601}}|P1Y2M|P3DT4H5M6S|P-1Y-2M3DT-4H-5M-6S|



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to