impala-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Rahn (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (IMPALA-1115) Impala should not ignore ORDER BY when using UNION
Date Sun, 18 Jun 2017 00:41:00 GMT

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

Greg Rahn closed IMPALA-1115.
-----------------------------
    Resolution: Fixed

Closing as duplicate of IMPALA-4741

> Impala should not ignore ORDER BY when using UNION
> --------------------------------------------------
>
>                 Key: IMPALA-1115
>                 URL: https://issues.apache.org/jira/browse/IMPALA-1115
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Frontend
>    Affects Versions: Impala 2.0
>            Reporter: casey
>            Priority: Minor
>              Labels: incompatibility, sql-language
>
> Impala doesnt apply ORDER BY to queries that contain a UNION. (A warning with that info
is shown to the user.) On postgres, mysql, and oracle, the ORDER BY is applied. It would be
great if impala would also apply the ordering to be consistent.
> Impala:
> {noformat}
> [localhost:21000] > select smallint_col_3 from table_1 union select bigint_col_2 from
table_2 order by 1;
> ...
> | 295            |
> | -151           |
> | 462            |
> | -896           |
> +----------------+
> Returned 2002 row(s) in 1.27s
> WARNINGS: Ignoring ORDER BY clause without LIMIT or OFFSET: ORDER BY 1 ASC
> .An ORDER BY without a LIMIT or OFFSET appearing in an (inline) view, union operand or
an INSERT/CTAS statement has no effect on the query result.
> {noformat}
> Oracle:
> {noformat}
> SQL> select 1 from dual union select 2 from dual order by 1 desc;
> 	 1
> ----------
> 	 2
> 	 1
> {noformat}



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

Mime
View raw message