phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Soldatov (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (PHOENIX-4420) org.apache.hive.service.cli.HiveSQLException: java.io.IOException: java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Unexpected char: '\'
Date Tue, 05 Dec 2017 09:19:00 GMT

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

Sergey Soldatov resolved PHOENIX-4420.
--------------------------------------
    Resolution: Duplicate

> org.apache.hive.service.cli.HiveSQLException: java.io.IOException: java.lang.RuntimeException:
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Unexpected
char: '\'
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-4420
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4420
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.7.0
>            Reporter: Pulkit Bhardwaj
>
> org.apache.hive.service.cli.HiveSQLException: java.io.IOException: java.lang.RuntimeException:
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Unexpected
char: '\' 
> in hive when querying a table through Phoenix-Hive storage handler
> This would be seen if the schema name in the query is put in quotes(to enforce case sensitivity)
> Steps to reproduce
> 1. Create a schema in Phoenix in lower case. It is customer's requirement that the schema
names should all be in lower case.
> {code:sql}
> create schema "lowercaseschema"
> {code}
> 2. Setup the hive phoenix storage handler and then create a table in this lower case
schema.
> {code:sql}
> create table phoenix_table_hive ( 
> s1 string, 
> i1 int, 
> f1 float, 
> d1 double 
> ) 
> STORED BY 'org.apache.phoenix.hive.PhoenixStorageHandler' 
> TBLPROPERTIES ( 
> "phoenix.table.name" = '"lowercaseschema".phoenix_table_hive', 
> "phoenix.zookeeper.quorum" = "hannibal-1.openstacklocal", 
> "phoenix.zookeeper.znode.parent" = "/hbase-secure", 
> "phoenix.zookeeper.client.port" = "2181", 
> "phoenix.rowkeys" = "s1, i1", 
> "phoenix.column.mapping" = "s1:s1, i1:i1, f1:f1, d1:d1", 
> "phoenix.table.options" = "SALT_BUCKETS=10, DATA_BLOCK_ENCODING='DIFF'" 
> ); 
> {code}
> 3. From hive, run a select on the table
> {code:sql}
> select * from phoenix_table_hive
> {code}
> The following exception would be encountered
> {code:java}
> org.apache.hive.service.cli.HiveSQLException: java.io.IOException: java.lang.RuntimeException:
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Unexpected
char: '\'
> org.apache.hive.service.cli.HiveSQLException: java.io.IOException: java.lang.RuntimeException:
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Unexpected
char: '\'
> 	at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:264)
> 	at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:250)
> 	at org.apache.hive.jdbc.HiveQueryResultSet.next(HiveQueryResultSet.java:373)
> 	at org.apache.ambari.view.hive20.actor.ResultSetIterator.getNext(ResultSetIterator.java:119)
> 	at org.apache.ambari.view.hive20.actor.ResultSetIterator.handleMessage(ResultSetIterator.java:78)
> 	at org.apache.ambari.view.hive20.actor.HiveActor.onReceive(HiveActor.java:38)
> 	at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:167)
> 	at akka.actor.Actor$class.aroundReceive(Actor.scala:467)
> 	at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:97)
> 	at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
> 	at akka.actor.ActorCell.invoke(ActorCell.scala:487)
> 	at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
> 	at akka.dispatch.Mailbox.run(Mailbox.scala:220)
> 	at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:397)
> 	at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
> 	at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
> 	at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
> 	at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
> Caused by: org.apache.hive.service.cli.HiveSQLException: java.io.IOException: java.lang.RuntimeException:
org.apache.phoenix.exception.PhoenixParserException: ERROR 601 (42P00): Syntax error. Unexpected
char: '\'
> 	at org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(SQLOperation.java:414)
> 	at org.apache.hive.service.cli.operation.OperationManager.getOperationNextRowSet(OperationManager.java:233)
> 	at org.apache.hive.service.cli.session.HiveSessionImpl.fetchResults(HiveSessionImpl.java:784)
> 	at org.apache.hive.service.cli.CLIService.fetchResults(CLIService.java:520)
> 	at org.apache.hive.service.cli.thrift.ThriftCLIService.FetchResults(ThriftCLIService.java:709)
> 	at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1557)
> 	at org.apache.hive.service.cli.thrift.TCLIService$Processor$FetchResults.getResult(TCLIService.java:1542)
> 	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
> 	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
> 	at org.apache.thrift.server.TServlet.doPost(TServlet.java:83)
> 	at org.apache.hive.service.cli.thrift.ThriftHttpServlet.doPost(ThriftHttpServlet.java:206)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:349)
> 	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:449)
> 	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:925)
> 	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857)
> 	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
> 	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:76)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:609)
> 	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:45)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: java.io.IOException: java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixParserException:
ERROR 601 (42P00): Syntax error. Unexpected char: '\'
> 	at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:520)
> 	at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:427)
> 	at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:146)
> 	at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1765)
> 	at org.apache.hive.service.cli.operation.SQLOperation.getNextRowSet(SQLOperation.java:409)
> 	... 32 more
> Caused by: java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixParserException:
ERROR 601 (42P00): Syntax error. Unexpected char: '\'
> 	at org.apache.phoenix.hive.mapreduce.PhoenixInputFormat.getQueryPlan(PhoenixInputFormat.java:264)
> 	at org.apache.phoenix.hive.mapreduce.PhoenixInputFormat.getSplits(PhoenixInputFormat.java:129)
> 	at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextSplits(FetchOperator.java:371)
> 	at org.apache.hadoop.hive.ql.exec.FetchOperator.getRecordReader(FetchOperator.java:303)
> 	at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:458)
> 	... 36 more
> Caused by: java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixParserException:ERROR
601 (42P00): Syntax error. Unexpected char: '\'
> 	at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
> 	at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:118)
> 	at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1280)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1363)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.compileQuery(PhoenixStatement.java:1373)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.optimizeQuery(PhoenixStatement.java:1368)
> 	at org.apache.phoenix.hive.mapreduce.PhoenixInputFormat.getQueryPlan(PhoenixInputFormat.java:258)
> 	... 40 more
> Caused by: java.lang.RuntimeException: Unexpected char: '\'
> 	at org.apache.phoenix.parse.PhoenixSQLLexer.mOTHER(PhoenixSQLLexer.java:4324)
> 	at org.apache.phoenix.parse.PhoenixSQLLexer.mTokens(PhoenixSQLLexer.java:5437)
> 	at org.antlr.runtime.Lexer.nextToken(Lexer.java:89)
> 	at org.antlr.runtime.BufferedTokenStream.fetch(BufferedTokenStream.java:133)
> 	at org.antlr.runtime.BufferedTokenStream.sync(BufferedTokenStream.java:127)
> 	at org.antlr.runtime.CommonTokenStream.consume(CommonTokenStream.java:70)
> 	at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:106)
> 	at org.apache.phoenix.parse.PhoenixSQLParser.single_select(PhoenixSQLParser.java:4610)
> 	at org.apache.phoenix.parse.PhoenixSQLParser.unioned_selects(PhoenixSQLParser.java:4714)
> 	at org.apache.phoenix.parse.PhoenixSQLParser.select_node(PhoenixSQLParser.java:4780)
> 	at org.apache.phoenix.parse.PhoenixSQLParser.oneStatement(PhoenixSQLParser.java:789)
> 	at org.apache.phoenix.parse.PhoenixSQLParser.statement(PhoenixSQLParser.java:508)
> 	at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:108)
> 	... 45 more
> {code}



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

Mime
View raw message