[ https://issues.apache.org/jira/browse/LENS-433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Raghavendra Singh closed LENS-433. ---------------------------------- > tok_decimal does not exist > -------------------------- > > Key: LENS-433 > URL: https://issues.apache.org/jira/browse/LENS-433 > Project: Apache Lens > Issue Type: Bug > Reporter: Arshad Matin > Assignee: Amareshwari Sriramadasu > Fix For: 2.2 > > Attachments: LENS-433.patch > > > {noformat} > lens-shell>query execute select cast('17.29' as decimal(4,2)) from > country_carrier_map limit 1 > Launching query failed cause:Driver :org.apache.lens.driver.hive.HiveDriver > Cause :Error while compiling statement: FAILED: SemanticException [Error > 10001]: Line 1:59 Table not found 'country_carrier_map' > Driver :org.apache.lens.driver.jdbc.JDBCDriver Cause :FUNCTION > unified_global_dw.tok_decimal does not exist > {noformat} > logs > {noformat} > 24 Mar 2015 08:48:23,955 [QuerySubmitter] INFO hive.ql.parse.ParseDriver - > Parsing command: select cast('17.29' as decimal(4,2)) from > country_carrier_map limit 1 > 24 Mar 2015 08:48:23,956 [QuerySubmitter] INFO hive.ql.parse.ParseDriver - > Parse Completed > 24 Mar 2015 08:48:23,957 [estimate-31] INFO > org.apache.lens.driver.cube.RewriteUtil - Final rewritten query for > driver:org.apache.lens.driver.hive.HiveDriver@3569158f is: select > cast('17.29' as decimal(4,2)) from country_carrier_map limit 1 > 24 Mar 2015 08:48:23,962 [estimate-31] INFO > org.apache.lens.driver.hive.HiveDriver - Estimate: select cast('17.29' as > decimal(4,2)) from country_carrier_map limit 1 > 24 Mar 2015 08:48:23,962 [estimate-31] INFO > org.apache.lens.driver.hive.HiveDriver - Explain: select cast('17.29' as > decimal(4,2)) from country_carrier_map limit 1 > 24 Mar 2015 08:48:23,963 [estimate-31] INFO > org.apache.lens.server.api.query.AbstractQueryContext - Generated metric id: > da297501-1483-4af6-a342-45012862df9c for query: EXPLAIN EXTENDED select > cast('17.29' as decimal(4,2)) from country_carrier_map limit 1 > 24 Mar 2015 08:48:23,963 [estimate-31] INFO > org.apache.lens.driver.hive.HiveDriver - Hive driver query:EXPLAIN EXTENDED > select cast('17.29' as decimal(4,2)) from country_carrier_map limit 1 > 24 Mar 2015 08:48:23,963 [estimate-31] INFO > org.apache.lens.driver.hive.HiveDriver - New thrift connection class > org.apache.lens.driver.hive.RemoteThriftConnection for thread:316 for > user:dataqa connection ID=12 > 24 Mar 2015 08:48:23,963 [estimate-31] INFO > org.apache.lens.driver.hive.RemoteThriftConnection - HiveDriver connecting > to HiveServer @ localhost:10000 > 24 Mar 2015 08:48:23,963 [estimate-31] INFO > org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient - > Connecting to localhost:10000 > 24 Mar 2015 08:48:23,962 [estimate-32] INFO > org.apache.lens.driver.cube.RewriteUtil - Final rewritten query for > driver:org.apache.lens.driver.jdbc.JDBCDriver@5ffcaad4 is: select > cast('17.29' as decimal(4,2)) from country_carrier_map limit 1 > 24 Mar 2015 08:48:24,031 [Grizzly-worker(2)] INFO > org.apache.lens.server.AuthenticationFilter - Request from user: null, > path=/queryapi/queries/26d2108d-bac5-4528-a3bf-cee6cf36260e > 24 Mar 2015 08:48:24,080 [estimate-31] INFO > org.apache.hive.service.cli.thrift.RetryingThriftCLIServiceClient - > Connected! > 24 Mar 2015 08:48:24,081 [estimate-31] INFO > org.apache.lens.driver.hive.RemoteThriftConnection - HiveDriver connected to > HiveServer @ localhost:10000 > 24 Mar 2015 08:48:24,096 [estimate-31] INFO > org.apache.lens.driver.hive.HiveDriver - No hive operation available for > 0e531402-5db7-4631-862e-69b7834ca19a > 24 Mar 2015 08:48:24,096 [estimate-31] ERROR > org.apache.lens.server.api.query.AbstractQueryContext - Setting driver cost > failed for driver org.apache.lens.driver.hive.HiveDriver@3569158f Cause: > Driver :org.apache.lens.driver.hive.HiveDriver Cause :Error while compiling > statement: FAILED: SemanticException [Error 10001]: Line 1:59 Table not found > 'country_carrier_map' > 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.estimate(HiveDriver.java:359) > 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.hive.service.cli.HiveSQLException: Error while > compiling statement: FAILED: SemanticException [Error 10001]: Line 1:59 Table > not found 'country_carrier_map' > 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) > ... 10 more > 24 Mar 2015 08:48:24,096 [estimate-31] ERROR > org.apache.lens.server.query.QueryExecutionServiceImpl - Estimate failed for > driver org.apache.lens.driver.hive.HiveDriver@3569158f cause: Driver > :org.apache.lens.driver.hive.HiveDriver Cause :Error while compiling > statement: FAILED: SemanticException [Error 10001]: Line 1:59 Table not found > 'country_carrier_map' > 24 Mar 2015 08:48:24,142 [estimate-32] INFO hive.ql.parse.ParseDriver - > Parsing command: select cast('17.29' as decimal(4,2)) from > country_carrier_map limit 1 > 24 Mar 2015 08:48:24,143 [estimate-32] INFO hive.ql.parse.ParseDriver - > Parse Completed > 24 Mar 2015 08:48:24,143 [estimate-32] INFO hive.ql.parse.ParseDriver - > Parsing command: select cast('17.29' as decimal(4,2)) from > country_carrier_map limit 1 > 24 Mar 2015 08:48:24,144 [estimate-32] INFO hive.ql.parse.ParseDriver - > Parse Completed > 24 Mar 2015 08:48:24,145 [estimate-32] INFO > org.apache.lens.driver.jdbc.ColumnarSQLRewriter - @@@Query not eligible for > inner subquery rewrite > 24 Mar 2015 08:48:24,145 [estimate-32] INFO > org.apache.lens.driver.jdbc.ColumnarSQLRewriter - Input Query : select > cast('17.29' as decimal(4,2)) from country_carrier_map limit 1 > 24 Mar 2015 08:48:24,145 [estimate-32] INFO > org.apache.lens.driver.jdbc.ColumnarSQLRewriter - Rewritten Query : select > tok_decimal( '17.29' ) from country_carrier_map limit 1 > 24 Mar 2015 08:48:24,192 [estimate-32] 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 :FUNCTION > unified_global_dw.tok_decimal does not exist > org.apache.lens.api.LensException: java.sql.SQLWarning: FUNCTION > unified_global_dw.tok_decimal does not exist > at > org.apache.lens.driver.jdbc.JDBCDriver.prepareInternal(JDBCDriver.java:757) > 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: java.sql.SQLWarning: FUNCTION unified_global_dw.tok_decimal does > not exist > at > com.mysql.jdbc.SQLError.convertShowWarningsToSQLWarnings(SQLError.java:730) > at > com.mysql.jdbc.SQLError.convertShowWarningsToSQLWarnings(SQLError.java:658) > at com.mysql.jdbc.Statement.getWarnings(Statement.java:2004) > at > com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.getWarnings(NewProxyPreparedStatement.java:1597) > at > org.apache.lens.driver.jdbc.JDBCDriver.prepareInternal(JDBCDriver.java:756) > ... 10 more > 24 Mar 2015 08:48:24,192 [estimate-32] 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 :FUNCTION > unified_global_dw.tok_decimal does not exist > 24 Mar 2015 08:48:24,192 [QuerySubmitter] ERROR > org.apache.lens.server.query.QueryExecutionServiceImpl - Error launching > query 26d2108d-bac5-4528-a3bf-cee6cf36260e > org.apache.lens.api.LensException: Driver > :org.apache.lens.driver.hive.HiveDriver Cause :Error while compiling > statement: FAILED: SemanticException [Error 10001]: Line 1:59 Table not found > 'country_carrier_map' > Driver :org.apache.lens.driver.jdbc.JDBCDriver Cause :FUNCTION > unified_global_dw.tok_decimal does not exist > at > org.apache.lens.server.query.QueryExecutionServiceImpl.rewriteAndSelect(QueryExecutionServiceImpl.java:1071) > at > org.apache.lens.server.query.QueryExecutionServiceImpl.access$800(QueryExecutionServiceImpl.java:76) > at > org.apache.lens.server.query.QueryExecutionServiceImpl$QuerySubmitter.run(QueryExecutionServiceImpl.java:471) > at java.lang.Thread.run(Thread.java:701) > 24 Mar 2015 08:48:24,258 [Grizzly-worker(3)] INFO > org.apache.lens.server.AuthenticationFilter - Request from user: null, > path=/queryapi/queries/26d2108d-bac5-4528-a3bf-cee6cf36260e > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)