[
https://issues.apache.org/jira/browse/IMPALA-9018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Quanlong Huang reassigned IMPALA-9018:
--------------------------------------
Assignee: (was: Shant Hovsepian)
> ORDER BY using an expression + column alias fails with "Could not resolve
> column/field"
> ---------------------------------------------------------------------------------------
>
> Key: IMPALA-9018
> URL: https://issues.apache.org/jira/browse/IMPALA-9018
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Reporter: Greg Rahn
> Priority: Critical
>
> Test case:
> {noformat}
> select version();
> +-----------------------------------------------------------------------------------------+
> | version()
> |
> +-----------------------------------------------------------------------------------------+
> | impalad version 3.4.0-SNAPSHOT RELEASE (build
> f047e967d099119717d1d3bbb7a235554707513f) |
> | Built on Mon Oct 7 10:07:27 UTC 2019
> |
> +-----------------------------------------------------------------------------------------+
> -- works
> with t as (select a from (values(1 as a),(2),(3)) t)
> select
> a,
> a + 10 as alias_of_a
> from t
> order by abs(a);
> +---+------------+
> | a | alias_of_a |
> +---+------------+
> | 1 | 11 |
> | 2 | 12 |
> | 3 | 13 |
> +---+------------+
> -- fails with
> -- AnalysisException: Could not resolve column/field reference: 'alias_of_a'
> with t as (select a from (values(1 as a),(2),(3)) t)
> select
> a,
> a + 10 as alias_of_a
> from t
> order by abs(alias_of_a);
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]