[ 
https://issues.apache.org/jira/browse/DRILL-2914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14520773#comment-14520773
 ] 

Venki Korukanti commented on DRILL-2914:
----------------------------------------

This seems like a planning or '\*' handling issue. We get the group by expr as 
"\*" in HashAgg which materializes to null constant. Projecting the field 
*gender* from inner query returns the correct result.

{code}
select gender2.gender as c0 from (SELECT gender FROM 
dfs.`/Users/hadoop/Downloads/customer`) as gender2 group by gender2.gender 
order by gender2.gender ASC NULLS LAST;
{code}

> regression: Mondrian query534.q, drill give wrong result
> --------------------------------------------------------
>
>                 Key: DRILL-2914
>                 URL: https://issues.apache.org/jira/browse/DRILL-2914
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Relational Operators
>    Affects Versions: 0.9.0
>            Reporter: Chun Chang
>            Assignee: Chris Westin
>            Priority: Critical
>         Attachments: customer
>
>
> #Wed Apr 29 14:39:22 EDT 2015
> git.commit.id.abbrev=f5b0f49
> Running mondrian tests and noticed several regressions. This one is related 
> to group by with select * subquery.
> {code}
> SELECT gender2.gender AS c0 
> FROM   (SELECT * 
>         FROM   customer) AS gender2 
> GROUP  BY gender2.gender 
> ORDER  BY gender2.gender ASC nulls last;
> {code}
> Correct result from postgres:
> {code}
> foodmart=# select gender2.gender as c0 from (SELECT * FROM customer) as 
> gender2 group by gender2.gender order by gender2.gender ASC NULLS LAST;
>  c0
> ----
>  F
>  M
> (2 rows)
> {code}
> Wrong result from drill:
> {code}
> 0: jdbc:drill:schema=dfs.drillTestDirAdvanced> select gender2.gender as c0 
> from (SELECT * FROM customer) as gender2 group by gender2.gender order by 
> gender2.gender ASC NULLS LAST;
> +------------+
> |     c0     |
> +------------+
> | null       |
> +------------+
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to