You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/05/28 20:43:17 UTC

[jira] [Created] (DRILL-3204) Problem in name resolution with window functions

Victoria Markman created DRILL-3204:
---------------------------------------

             Summary: Problem in name resolution with window functions
                 Key: DRILL-3204
                 URL: https://issues.apache.org/jira/browse/DRILL-3204
             Project: Apache Drill
          Issue Type: Bug
          Components: Query Planning & Optimization
    Affects Versions: 1.0.0
            Reporter: Victoria Markman
            Assignee: Jinfeng Ni


Trying to use window functions with the join and window aggregate function on one of the columns coming out of join, get an error:
{code}
0: jdbc:drill:schema=dfs> select sum(t1.a1) over(partition by t1.b1)  from t1, t2 where t1.c1 = t2.c2 group by t1.a1, t1.b1;
Error: PARSE ERROR: At line 0, column 0: Column 'a1' is ambiguous
[Error Id: 3a6c4906-c48f-41c7-b9e1-3f59a951e55f on atsqa4-133.qa.lab:31010] (state=,code=0)
{code}

Tables used in the query:
{code}
0: jdbc:drill:schema=dfs> select * from t1 limit 1;
+-----+--------+-------------+
| a1  |   b1   |     c1      |
+-----+--------+-------------+
| 1   | aaaaa  | 2015-01-01  |
+-----+--------+-------------+
1 row selected (0.133 seconds)

0: jdbc:drill:schema=dfs> select * from t2 limit 1;
+-----+------+-------------+
| a2  |  b2  |     c2      |
+-----+------+-------------+
| 0   | zzz  | 2014-12-31  |
+-----+------+-------------+
1 row selected (0.121 seconds)
{code}



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