#Mon Jul 14 10:10:52 PDT 2014
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"
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;
4 rows selected (0.491 seconds)