You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Toshihiro Suzuki (Jira)" <ji...@apache.org> on 2019/10/29 17:44:00 UTC

[jira] [Created] (PHOENIX-5552) Hive against Phoenix gets 'Expecting "RPAREN", got "L"' in Tez mode

Toshihiro Suzuki created PHOENIX-5552:
-----------------------------------------

             Summary: Hive against Phoenix gets 'Expecting "RPAREN", got "L"' in Tez mode
                 Key: PHOENIX-5552
                 URL: https://issues.apache.org/jira/browse/PHOENIX-5552
             Project: Phoenix
          Issue Type: Bug
            Reporter: Toshihiro Suzuki
            Assignee: Toshihiro Suzuki


Steps to reproduce are as follows;

1. Create a table that has a BIGINT column in Phoenix:
{code:java}
CREATE TABLE TBL (
 COL1 VARCHAR PRIMARY KEY,
 COL2 BIGINT
);
{code}
2. Create an external table in Hive against the table created step 1:
{code:java}
create external table tbl (
 col1 string,
 col2 bigint
)
STORED BY 'org.apache.phoenix.hive.PhoenixStorageHandler'
TBLPROPERTIES (
 "phoenix.table.name" = "TBL",
 "phoenix.zookeeper.quorum" = ...,
 "phoenix.zookeeper.znode.parent" = ...,
 "phoenix.zookeeper.client.port" = "2181",
 "phoenix.rowkeys" = "COL1",
 "phoenix.column.mapping" = "col1:COL1,col2:COL2"
);
{code}
3. Issue a query for the hive table with a condition of the BIGINT column in Tez mode, but the following error happens:
{code:java}
> select * from tbl where col2 = 100;
Error: java.io.IOException: java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixParserException: ERROR 603 (42P00): Syntax error. Unexpected input. Expecting "RPAREN", got "L" at line 1, column 67. (state=,code=0)
{code}
In this case, the problem is that Hive passes whereClause "col2=100L" (as a bigint value with 'L') to Phoenix, but phoenix can't accept the bigint value with 'L', so the syntax error happens.

We need to remove 'L' for bigint values when building phoenix queries.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)