You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Chun Chang (JIRA)" <ji...@apache.org> on 2015/04/30 02:19:08 UTC
[jira] [Commented] (DRILL-2914) regression: Mondrian query534.q,
drill give wrong result
[ https://issues.apache.org/jira/browse/DRILL-2914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14520579#comment-14520579 ]
Chun Chang commented on DRILL-2914:
-----------------------------------
There are several other queries failed likely due to the group by issue. This one fails too. query536.q
{code}
SELECT time_by_day.the_year AS c0,
gender2.gender AS c1,
Sum(sales_fact_1997.unit_sales) AS m0
FROM time_by_day AS time_by_day,
sales_fact_1997 AS sales_fact_1997,
(SELECT *
FROM customer) AS gender2
WHERE sales_fact_1997.time_id = time_by_day.time_id
AND time_by_day.the_year = 1997
AND sales_fact_1997.customer_id = gender2.customer_id
GROUP BY time_by_day.the_year,
gender2.gender;
{code}
correct result from postgres:
{code}
foodmart=# select time_by_day.the_year as c0, gender2.gender as c1, sum(sales_fact_1997.unit_sales) as m0 from time_by_day as time_by_day, sales_fact_1997 as sales_fact_1997, (SELECT * FROM customer) as gender2 where sales_fact_1997.time_id = time_by_day.time_id and time_by_day.the_year = 1997 and sales_fact_1997.customer_id = gender2.customer_id group by time_by_day.the_year, gender2.gender;
c0 | c1 | m0
------+----+-------------
1997 | F | 131558.0000
1997 | M | 135215.0000
(2 rows)
{code}
wrong drill result:
{code}
0: jdbc:drill:schema=dfs.drillTestDirAdvanced> select time_by_day.the_year as c0, gender2.gender as c1, sum(sales_fact_1997.unit_sales) as m0 from time_by_day as time_by_day, sales_fact_1997 as sales_fact_1997, (SELECT * FROM customer) as gender2 where sales_fact_1997.time_id = time_by_day.time_id and time_by_day.the_year = 1997 and sales_fact_1997.customer_id = gender2.customer_id group by time_by_day.the_year, gender2.gender;
+------------+------------+------------+
| c0 | c1 | m0 |
+------------+------------+------------+
| 1997 | null | 266773.0 |
+------------+------------+------------+
{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
>
> #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)