You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Kunal Khatua (JIRA)" <ji...@apache.org> on 2017/05/23 22:08:05 UTC

[jira] [Assigned] (DRILL-5467) Issue with column alias for nested table calculated columns

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

Kunal Khatua reassigned DRILL-5467:
-----------------------------------

    Assignee: Vitalii Diravka

> 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
>            Assignee: Vitalii Diravka
>
> 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)