Description
smilegator has found that the following query does not raise a syntax error (note the GROUP BY clause is commented out):
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 ))
There could be multiple values of c1.cv for each value of avg(c1.cv).
Attachments
Issue Links
- relates to
-
SPARK-19047 Invalid correlated column may not be reported as an error
- Resolved
- links to