[
https://issues.apache.org/jira/browse/LENS-432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Raghavendra Singh closed LENS-432.
----------------------------------
> Select statement is missing from rewritten query
> ------------------------------------------------
>
> Key: LENS-432
> URL: https://issues.apache.org/jira/browse/LENS-432
> Project: Apache Lens
> Issue Type: Bug
> Reporter: Arshad Matin
> Fix For: 2.2
>
>
> {noformat}
> lens-shell>query execute cube select 3.1415926BD from country_carrier_map
> limit 1
> Launching query failed cause:Error while compiling statement: FAILED:
> ParseException line 1:8 cannot recognize input near 'FROM' 'mar12' '.' in
> select clause
> lens-shell>
> {noformat}
> {noformat}
> 24 Mar 2015 08:44:39,557 [QuerySubmitter] INFO hive.ql.parse.ParseDriver -
> Parsing command: cube select 3.1415926BD from country_carrier_map limit 1
> 24 Mar 2015 08:44:39,558 [QuerySubmitter] INFO hive.ql.parse.ParseDriver -
> Parse Completed
> 24 Mar 2015 08:44:39,561 [estimate-29] INFO hive.ql.parse.ParseDriver -
> Parsing command: cube select 3.1415926BD from country_carrier_map limit 1
> 24 Mar 2015 08:44:39,562 [estimate-29] INFO hive.ql.parse.ParseDriver -
> Parse Completed
> 24 Mar 2015 08:44:39,562 [estimate-29] INFO
> org.apache.lens.cube.parse.CandidateTableResolver - Populated candidate
> dims:[country_carrier_map_table, country_carrier_map_subset] for
> country_carrier_map
> 24 Mar 2015 08:44:39,563 [estimate-29] INFO
> org.apache.lens.cube.parse.JoinResolver - No dimension tables to resolve and
> no join chains present!
> 24 Mar 2015 08:44:39,563 [estimate-29] INFO
> org.apache.lens.cube.parse.GroupbyResolver - Not promoting groupby
> expression to select, since there are expression projected
> 24 Mar 2015 08:44:39,563 [estimate-29] INFO
> org.apache.lens.cube.parse.StorageTableResolver - Adding existing
> partitionlatest
> 24 Mar 2015 08:44:39,563 [estimate-29] INFO
> org.apache.lens.cube.parse.StorageTableResolver - Storage:uh1_ib is not
> supported
> 24 Mar 2015 08:44:39,563 [estimate-29] INFO
> org.apache.lens.cube.parse.StorageTableResolver - Not considering dim
> table:country_carrier_map_subset as no candidate storage tables eixst
> 24 Mar 2015 08:44:39,568 [estimate-29] INFO
> org.apache.lens.cube.parse.CubeQueryContext - Available candidate dims
> are:[country_carrier_map_table], picking up country_carrier_map_table for
> querying
> 24 Mar 2015 08:44:39,568 [estimate-29] INFO
> org.apache.lens.cube.parse.CubeQueryContext - Picked Fact:null
> dimsToQuery:{country_carrier_map=country_carrier_map_table}
> 24 Mar 2015 08:44:39,568 [estimate-29] INFO
> org.apache.lens.driver.cube.RewriteUtil - Final rewritten query for
> driver:org.apache.lens.driver.hive.HiveDriver@3569158f is: SELECT FROM
> mar12.uh1_country_carrier_map_table country_carrier_map WHERE
> ((((country_carrier_map.dt = 'latest')))) LIMIT 1
> 24 Mar 2015 08:44:39,568 [estimate-29] INFO
> org.apache.lens.driver.hive.HiveDriver - Estimate: SELECT FROM
> mar12.uh1_country_carrier_map_table country_carrier_map WHERE
> ((((country_carrier_map.dt = 'latest')))) LIMIT 1
> 24 Mar 2015 08:44:39,569 [estimate-30] INFO hive.ql.parse.ParseDriver -
> Parsing command: cube select 3.1415926BD from country_carrier_map limit 1
> 24 Mar 2015 08:44:39,569 [estimate-30] INFO hive.ql.parse.ParseDriver -
> Parse Completed
> 24 Mar 2015 08:44:39,570 [estimate-30] INFO
> org.apache.lens.cube.parse.CandidateTableResolver - Populated candidate
> dims:[country_carrier_map_table, country_carrier_map_subset] for
> country_carrier_map
> 24 Mar 2015 08:44:39,570 [estimate-30] INFO
> org.apache.lens.cube.parse.JoinResolver - No dimension tables to resolve and
> no join chains present!
> 24 Mar 2015 08:44:39,570 [estimate-30] INFO
> org.apache.lens.cube.parse.GroupbyResolver - Not promoting groupby
> expression to select, since there are expression projected
> 24 Mar 2015 08:44:39,570 [estimate-30] INFO
> org.apache.lens.cube.parse.StorageTableResolver - Storage:uh1 is not
> supported
> 24 Mar 2015 08:44:39,571 [estimate-30] INFO
> org.apache.lens.cube.parse.StorageTableResolver - Not considering dim
> table:country_carrier_map_table as no candidate storage tables eixst
> 24 Mar 2015 08:44:39,575 [estimate-30] INFO
> org.apache.lens.cube.parse.CubeQueryContext - Available candidate dims
> are:[country_carrier_map_subset], picking up country_carrier_map_subset for
> querying
> 24 Mar 2015 08:44:39,575 [estimate-30] INFO
> org.apache.lens.cube.parse.CubeQueryContext - Picked Fact:null
> dimsToQuery:{country_carrier_map=country_carrier_map_subset}
> 24 Mar 2015 08:44:39,575 [estimate-30] INFO
> org.apache.lens.driver.cube.RewriteUtil - Final rewritten query for
> driver:org.apache.lens.driver.jdbc.JDBCDriver@5ffcaad4 is: SELECT FROM
> mar12.uh1_ib_country_carrier_map_subset country_carrier_map LIMIT 1
> 24 Mar 2015 08:44:39,575 [estimate-30] INFO hive.ql.parse.ParseDriver -
> Parsing command: SELECT FROM mar12.uh1_ib_country_carrier_map_subset
> country_carrier_map LIMIT 1
> 24 Mar 2015 08:44:39,576 [estimate-30] ERROR
> org.apache.lens.server.api.query.AbstractQueryContext - Setting driver cost
> failed for driver org.apache.lens.driver.jdbc.JDBCDriver@5ffcaad4 Cause:
> Driver :org.apache.lens.driver.jdbc.JDBCDriver Cause :line 1:8 cannot
> recognize input near 'FROM' 'mar12' '.' in select clause
> org.apache.lens.api.LensException:
> org.apache.hadoop.hive.ql.parse.ParseException: line 1:8 cannot recognize
> input near 'FROM' 'mar12' '.' in select clause
> at
> org.apache.lens.driver.jdbc.JDBCDriver.rewriteQuery(JDBCDriver.java:534)
> at
> org.apache.lens.driver.jdbc.JDBCDriver.prepareInternal(JDBCDriver.java:749)
> at org.apache.lens.driver.jdbc.JDBCDriver.validate(JDBCDriver.java:642)
> at org.apache.lens.driver.jdbc.JDBCDriver.estimate(JDBCDriver.java:570)
> at
> org.apache.lens.server.api.query.AbstractQueryContext$DriverEstimateRunnable.run(AbstractQueryContext.java:208)
> at
> org.apache.lens.server.query.QueryExecutionServiceImpl$RewriteEstimateRunnable.run(QueryExecutionServiceImpl.java:1137)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:701)
> Caused by: org.apache.hadoop.hive.ql.parse.ParseException: line 1:8 cannot
> recognize input near 'FROM' 'mar12' '.' in select clause
> at
> org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:202)
> at
> org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
> at org.apache.lens.cube.parse.HQLParser.parseHQL(HQLParser.java:120)
> at
> org.apache.lens.driver.jdbc.JDBCDriver.rewriteQuery(JDBCDriver.java:522)
> ... 11 more
> 24 Mar 2015 08:44:39,577 [estimate-30] ERROR
> org.apache.lens.server.query.QueryExecutionServiceImpl - Estimate failed for
> driver org.apache.lens.driver.jdbc.JDBCDriver@5ffcaad4 cause: Driver
> :org.apache.lens.driver.jdbc.JDBCDriver Cause :line 1:8 cannot recognize
> input near 'FROM' 'mar12' '.' in select clause
> 24 Mar 2015 08:44:39,577 [QuerySubmitter] INFO
> org.apache.lens.driver.hive.HiveDriver - Hive driver query:SELECT FROM
> mar12.uh1_country_carrier_map_table country_carrier_map WHERE
> ((((country_carrier_map.dt = 'latest')))) LIMIT 1
> 24 Mar 2015 08:44:39,577 [QuerySubmitter] INFO
> org.apache.lens.driver.hive.HiveDriver - whetherCalculatePriority: true
> 24 Mar 2015 08:44:39,577 [QuerySubmitter] INFO
> org.apache.lens.driver.hive.HiveDriver - Explain: SELECT FROM
> mar12.uh1_country_carrier_map_table country_carrier_map WHERE
> ((((country_carrier_map.dt = 'latest')))) LIMIT 1
> 24 Mar 2015 08:44:39,577 [QuerySubmitter] INFO
> org.apache.lens.server.api.query.AbstractQueryContext - Generated metric id:
> b0562eef-fa56-4557-bd39-4710bf644620 for query: EXPLAIN EXTENDED SELECT FROM
> mar12.uh1_country_carrier_map_table country_carrier_map WHERE
> ((((country_carrier_map.dt = 'latest')))) LIMIT 1
> 24 Mar 2015 08:44:39,577 [QuerySubmitter] INFO
> org.apache.lens.driver.hive.HiveDriver - Hive driver query:EXPLAIN EXTENDED
> SELECT FROM mar12.uh1_country_carrier_map_table country_carrier_map WHERE
> ((((country_carrier_map.dt = 'latest')))) LIMIT 1
> 24 Mar 2015 08:44:39,578 [QuerySubmitter] INFO
> org.apache.lens.driver.hive.HiveDriver - New thrift connection class
> org.apache.lens.driver.hive.RemoteThriftConnection for thread:9 for
> user:dataqa connection ID=11
> 24 Mar 2015 08:44:39,578 [QuerySubmitter] INFO
> org.apache.lens.driver.hive.RemoteThriftConnection - HiveDriver connecting
> to HiveServer @ localhost:10000
> 24 Mar 2015 08:44:39,578 [QuerySubmitter] INFO
> org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient -
> Connecting to localhost:10000
> 24 Mar 2015 08:44:39,590 [Grizzly-worker(3)] INFO
> org.apache.lens.server.AuthenticationFilter - Request from user: null,
> path=/queryapi/queries/59ecd676-9c6c-483e-b065-95469b9f717e
> 24 Mar 2015 08:44:39,699 [QuerySubmitter] INFO
> org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient -
> Connected!
> 24 Mar 2015 08:44:39,700 [QuerySubmitter] INFO
> org.apache.lens.driver.hive.RemoteThriftConnection - HiveDriver connected to
> HiveServer @ localhost:10000
> 24 Mar 2015 08:44:39,710 [QuerySubmitter] INFO
> org.apache.lens.driver.hive.HiveDriver - No hive operation available for
> 5f7febcd-8ce6-42cf-9045-c7703fb0a7bf
> 24 Mar 2015 08:44:39,711 [QuerySubmitter] ERROR
> org.apache.lens.driver.hive.HiveDriver - could not set priority for lens
> session id:9c443acb-68af-425b-9f14-1f5ff5afa123User query: cube select
> 3.1415926BD from country_carrier_map limit 1
> org.apache.lens.api.LensException: Error executing query
> at org.apache.lens.driver.hive.HiveDriver.execute(HiveDriver.java:475)
> at org.apache.lens.driver.hive.HiveDriver.explain(HiveDriver.java:386)
> at
> org.apache.lens.driver.hive.HiveDriver.executeAsync(HiveDriver.java:494)
> at
> org.apache.lens.server.query.QueryExecutionServiceImpl$QuerySubmitter.run(QueryExecutionServiceImpl.java:477)
> at java.lang.Thread.run(Thread.java:701)
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while
> compiling statement: FAILED: ParseException line 1:25 cannot recognize input
> near 'FROM' 'mar12' '.' in select clause
> at
> org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.checkStatus(ThriftCLIServiceClient.java:52)
> at
> org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.executeStatementInternal(ThriftCLIServiceClient.java:151)
> at
> org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.executeStatement(ThriftCLIServiceClient.java:129)
> at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:622)
> at
> org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient.invokeInternal(RetryingThriftCLIServiceClient.java:301)
> at
> org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient.invoke(RetryingThriftCLIServiceClient.java:329)
> at com.sun.proxy.$Proxy66.executeStatement(Unknown Source)
> at
> org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient$CLIServiceClientWrapper.executeStatement(RetryingThriftCLIServiceClient.java:111)
> at org.apache.lens.driver.hive.HiveDriver.execute(HiveDriver.java:452)
> ... 4 more
> 24 Mar 2015 08:44:39,722 [QuerySubmitter] INFO
> org.apache.lens.driver.hive.HiveDriver - No hive operation available for
> 59ecd676-9c6c-483e-b065-95469b9f717e
> 24 Mar 2015 08:44:39,722 [QuerySubmitter] ERROR
> org.apache.lens.server.query.QueryExecutionServiceImpl - Error launching
> query 59ecd676-9c6c-483e-b065-95469b9f717e
> org.apache.lens.api.LensException: Error executing async query
> at
> org.apache.lens.driver.hive.HiveDriver.executeAsync(HiveDriver.java:513)
> at
> org.apache.lens.server.query.QueryExecutionServiceImpl$QuerySubmitter.run(QueryExecutionServiceImpl.java:477)
> at java.lang.Thread.run(Thread.java:701)
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while
> compiling statement: FAILED: ParseException line 1:8 cannot recognize input
> near 'FROM' 'mar12' '.' in select clause
> at
> org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.checkStatus(ThriftCLIServiceClient.java:52)
> at
> org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.executeStatementInternal(ThriftCLIServiceClient.java:151)
> at
> org.apache.hive.service.cli.thrift.ThriftCLIServiceClient.executeStatementAsync(ThriftCLIServiceClient.java:139)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:622)
> at
> org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient.invokeInternal(RetryingThriftCLIServiceClient.java:301)
> at
> org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient.invoke(RetryingThriftCLIServiceClient.java:329)
> at com.sun.proxy.$Proxy66.executeStatementAsync(Unknown Source)
> at
> org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient$CLIServiceClientWrapper.executeStatementAsync(RetryingThriftCLIServiceClient.java:118)
> at
> org.apache.lens.driver.hive.HiveDriver.executeAsync(HiveDriver.java:504)
> ... 2 more
> 24 Mar 2015 08:44:39,795 [Grizzly-worker(4)] INFO
> org.apache.lens.server.AuthenticationFilter - Request from user: null,
> path=/queryapi/queries/59ecd676-9c6c-483e-b065-95469b9f717e
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)