spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maxim Gekk (Jira)" <j...@apache.org>
Subject [jira] [Created] (SPARK-29385) Make `INTERVAL` values comparable
Date Tue, 08 Oct 2019 10:08:00 GMT
Maxim Gekk created SPARK-29385:
----------------------------------

             Summary: 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


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-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message