[ 
https://issues.apache.org/jira/browse/SPARK-29385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Gekk resolved SPARK-29385.
--------------------------------
    Fix Version/s: 3.0.0
       Resolution: Fixed

Resolved by the PR: https://github.com/apache/spark/pull/26337

> Make `INTERVAL` values comparable
> ---------------------------------
>
>                 Key: SPARK-29385
>                 URL: https://issues.apache.org/jira/browse/SPARK-29385
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Maxim Gekk
>            Priority: Major
>             Fix For: 3.0.0
>
>
> PostgreSQL allows to compare interval by `=`, `<>`, `<`, `<=`, `>`, `>=`. For 
> example:
> {code}
> maxim=# select interval '1 month' > interval '29 days';
>  ?column? 
> ----------
>  t
> {code}
> but the same fails in Spark:
> {code}
> spark-sql> select interval 1 month > interval 29 days;
> Error in query: cannot resolve '(interval 1 months > interval 4 weeks 1 
> days)' due to data type mismatch: GreaterThan does not support ordering on 
> type interval; line 1 pos 7;
> 'Project [unresolvedalias((interval 1 months > interval 4 weeks 1 days), 
> None)]
> +- OneRowRelation
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to