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

Rajitha R commented on LENS-1494:
---------------------------------

This is happening due to the alias with quotations in the rewritten query. 

{code}
19 Dec 2017 09:30:35 [27c52632-448f-4e6a-a1a1-a4536138f674] 
[f4cfbe62-a3d6-485d-9793-8a52eefa405f estimate-3] INFO  
org.apache.lens.driver.jdbc.ColumnarSQLRewriter 1229 - Rewritten Query : select 
sum((mydb_sales_aggr_continuous_fact___sales.store_sales)) as `store_sales` 
from mydb_sales_aggr_continuous_fact mydb_sales_aggr_continuous_fact___sales  
where (mydb_sales_aggr_continuous_fact___sales.order_time) between '2017-12-17 
15:00:35' and '2017-12-19 15:00:35'
{code}

As seen above `store_sales` is cause of the issue. This needs to be fixed.

> Failure in Lens example query 
> ------------------------------
>
>                 Key: LENS-1494
>                 URL: https://issues.apache.org/jira/browse/LENS-1494
>             Project: Apache Lens
>          Issue Type: Bug
>          Components: examples
>            Reporter: Rajitha R
>            Priority: Minor
>
> Able to run examples
> Successful queries 150 out of 151queries
> Total time for running examples(in millis) :839963
> 1 failed
> One Failiure
> Query:cube select store_sales from sales where time_range_in(order_time, 
> 'now.second-2 days', 'now.second')
> 15 Dec 2017 10:08:41 [main] ERROR cliLogger - Exception for example query : 
> "cube select store_sales from sales where time_range_in(order_time, 
> 'now.second-2 days', 'now.second')"
> org.apache.lens.client.exceptions.LensAPIException: Semantic Error : unknown 
> token:
>     at 
> org.apache.lens.client.LensStatement.submitQuery(LensStatement.java:482) 
> ~[lens-client-2.7.1-SNAPSHOT.jar:2.7.1-SNAPSHOT]
>     at 
> org.apache.lens.client.LensStatement.executeQuery(LensStatement.java:95) 
> ~[lens-client-2.7.1-SNAPSHOT.jar:2.7.1-SNAPSHOT]
>     at 
> org.apache.lens.examples.SampleQueries.runQueries(SampleQueries.java:138) 
> [lens-examples-2.7.1-SNAPSHOT.jar:2.7.1-SNAPSHOT]
>     at 
> org.apache.lens.examples.SampleQueries.queryAll(SampleQueries.java:107) 
> [lens-examples-2.7.1-SNAPSHOT.jar:2.7.1-SNAPSHOT]
>     at org.apache.lens.examples.SampleQueries.main(SampleQueries.java:87) 
> [lens-examples-2.7.1-SNAPSHOT.jar:2.7.1-SNAPSHOT]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to