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 2017/02/17 22:56:44 UTC

[jira] [Closed] (DRILL-1152) mondrian query - sql parser error: SqlValidatorException:[ Column 'fullname' is ambiguous ]"

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

Chun Chang closed DRILL-1152.
-----------------------------

> mondrian query - sql parser error: SqlValidatorException:[ Column 'fullname' is ambiguous ]"
> --------------------------------------------------------------------------------------------
>
>                 Key: DRILL-1152
>                 URL: https://issues.apache.org/jira/browse/DRILL-1152
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: SQL Parser
>            Reporter: Chun Chang
>            Priority: Minor
>             Fix For: 0.4.0
>
>
> #Mon Jul 14 10:10:52 PDT 2014
> git.commit.id.abbrev=699851b
> The following mondrian query (query12.q) failed sql parser:
> 0: jdbc:drill:schema=dfs> select customer.country as c0, customer.state_province as c1, customer.city as c2, customer.customer_id as c3, fullname as c4, fullname as c5, customer.gender as c6, customer.marital_status as c7, customer.education as c8, customer.yearly_income as c9 from customer as customer, sales_fact_1997 as sales_fact_1997, time_by_day as time_by_day where sales_fact_1997.customer_id = customer.customer_id and sales_fact_1997.time_id = time_by_day.time_id and time_by_day.the_year = 1997 group by customer.country, customer.state_province, customer.city, customer.customer_id, fullname, customer.gender, customer.marital_status, customer.education, customer.yearly_income having fullname LIKE '%Jeanne%' order by customer.country ASC NULLS LAST, customer.state_province ASC NULLS LAST, customer.city ASC NULLS LAST, fullname ASC NULLS LAST;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id: "18220efe-a9f8-450c-bbf7-4ef1cf873cd0"
> endpoint {
>   address: "qa-node120.qa.lab"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while parsing sql. < ValidationException:[ org.eigenbase.util.EigenbaseContextException: From line 1, column 571 to line 1, column 578 ] < EigenbaseContextException:[ From line 1, column 571 to line 1, column 578 ] < SqlValidatorException:[ Column 'fullname' is ambiguous ]"
> ]
> Error: exception while executing query (state=,code=0)
> If I qualify the column name 'fullname' as 'customer.fullname', then query works. 
> The thing is with similar but a bit simplified query that I do not qualify the column name, it works fine. Only fails for this particular query. So far, I failed to isolate the problem. For example, the following query works without qualifying the column name:
> 0: jdbc:drill:schema=dfs> select customer.country as c0, fullname as c4 from customer as customer group by customer.country, fullname limit 4;
> +------------+------------+
> |     c0     |     c4     |
> +------------+------------+
> | [B@6fe52815 | [B@2daab417 |
> | [B@2215696d | [B@2bbc8496 |
> | [B@65a4aa48 | [B@1da7911a |
> | [B@6427512b | [B@5142116b |
> +------------+------------+
> 4 rows selected (0.491 seconds)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)