Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5552

Hive against Phoenix gets 'Expecting "RPAREN", got "L"' in Tez mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • connectors-6.0.0
    • connectors-6.0.0
    • None
    • None

    Description

      Steps to reproduce are as follows;

      1. Create a table that has a BIGINT column in Phoenix:

      CREATE TABLE TBL (
       COL1 VARCHAR PRIMARY KEY,
       COL2 BIGINT
      );
      

      2. Create an external table in Hive against the table created step 1:

      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"
      );
      

      3. Issue a query for the hive table with a condition of the BIGINT column in Tez mode, but the following error happens:

      > 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)
      

      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.

      It looks like this issue happens only in Tez mode.

      Attachments

        Issue Links

          Activity

            People

              brfrn169 Toshihiro Suzuki
              brfrn169 Toshihiro Suzuki
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m