You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Bikramjeet Vig (JIRA)" <ji...@apache.org> on 2017/07/31 17:32:00 UTC

[jira] [Resolved] (IMPALA-1882) Remove ORDER BY restriction from first_value()/last_value()

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

Bikramjeet Vig resolved IMPALA-1882.
------------------------------------
    Resolution: Fixed


IMPALA-1882: Remove ORDER BY restriction from first_value()/last_value()

In order to conform to the ISO SQL specifications, this patch allows
the 'order by' clause to be optional for first_value() and last_value()
analytical functions.

Testing:
1. Added Analyzer tests
2. Added Planner tests which checks that a sort node is not used if both
'order by' and 'partition by' clauses are not used. Also, checks that
if only 'partition by' clause is used then the sorting is done only on
the partition column.
3. Added a query test that checks that the input is not reordered by
these analytic functions if 'order by' clause is not used

Change-Id: I5a3a56833ac062839629353ea240b361bc727d96
Reviewed-on: http://gerrit.cloudera.org:8080/7502
Reviewed-by: Matthew Jacobs <mj...@cloudera.com>
Tested-by: Impala Public Jenkins

> Remove ORDER BY restriction from first_value()/last_value()
> -----------------------------------------------------------
>
>                 Key: IMPALA-1882
>                 URL: https://issues.apache.org/jira/browse/IMPALA-1882
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 2.1, Impala 2.2
>            Reporter: Jonathan Seidman
>            Assignee: Bikramjeet Vig
>              Labels: ansi-sql, ramp-up, sql-language
>
> Ordering requirement should be removed from first_value() usage. This is not required by ISO SQL spec, and is a deficiency for BI tools leveraging analytic functionality.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)