[
https://issues.apache.org/jira/browse/DRILL-5467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rakesh updated DRILL-5467:
--------------------------
Summary: Issue with column alias for nested table calculated columns (was:
Issue with column alias)
> Issue with column alias for nested table calculated columns
> -----------------------------------------------------------
>
> Key: DRILL-5467
> URL: https://issues.apache.org/jira/browse/DRILL-5467
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.10.0
> Reporter: Rakesh
>
> The column alias is not always correctly used in output. When columns as
> calculated in nested table, the outer most project doesn't show the column
> alias correctly:
> SELECT `Custom_SQL_Query`.`Bucket` AS `Bucket`,
> SUM(`Custom_SQL_Query`.`male`) AS `sum_male`
> FROM (SELECT first_name as `Bucket`, salary as `num`, case when gender = 'M'
> then 1 else 0 end as male, case when gender = 'F' then 1 else 0 end as female
> FROM cp.`employee.json`) `Custom_SQL_Query`
> GROUP BY `Custom_SQL_Query`.`Bucket`
> Here 'sum_male' appears as $f1 instead
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)