spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Herman van Hovell (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SPARK-18863) Output non-aggregate expressions without GROUP BY in a subquery does not yield an error
Date Wed, 25 Jan 2017 16:10:27 GMT

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

Herman van Hovell resolved SPARK-18863.
---------------------------------------
       Resolution: Fixed
         Assignee: Nattavut Sutyanyong
    Fix Version/s: 2.2.0
                   2.1.1
                   2.0.3

> Output non-aggregate expressions without GROUP BY in a subquery does not yield an error

> ----------------------------------------------------------------------------------------
>
>                 Key: SPARK-18863
>                 URL: https://issues.apache.org/jira/browse/SPARK-18863
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.0.0
>            Reporter: Nattavut Sutyanyong
>            Assignee: Nattavut Sutyanyong
>             Fix For: 2.0.3, 2.1.1, 2.2.0
>
>
> [~smilegator] has found that the following query does not raise a syntax error (note
the GROUP BY clause is commented out):
> {code:sql}
> SELECT pk, cv
> FROM   p, c
> WHERE  p.pk = c.ck
> AND    c.cv = (SELECT max(avg)
>                FROM   (SELECT   c1.cv, avg(c1.cv) avg
>                        FROM     c c1
>                        WHERE    c1.ck = p.pk
> --                       GROUP BY c1.cv
>                       ))
> {code}
> There could be multiple values of {{c1.cv}} for each value of {{avg(c1.cv)}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message