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

UpgradeUtil#disableViewIndexes not working properly for views with schema name

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.8.0
    • Component/s: None
    • Labels:
      None

      Description

      In UpgradeUtil#disableViewIndexes we are prefixing the schema name to index than view so ALTER INDEX parsing is failing

      Error: ERROR 604 (42P00): Syntax error. Mismatched input. Expecting "ON", got "." at line 1, column 16. (state=42P00,code=604)
      org.apache.phoenix.exception.PhoenixParserException: ERROR 604 (42P00): Syntax error. Mismatched input. Expecting "ON", got "." at line 1, column 16.
      	at org.apache.phoenix.exception.PhoenixParserException.newException(PhoenixParserException.java:33)
      	at org.apache.phoenix.parse.SQLParser.parseStatement(SQLParser.java:111)
      	at org.apache.phoenix.jdbc.PhoenixStatement$PhoenixStatementParser.parseStatement(PhoenixStatement.java:1285)
      	at org.apache.phoenix.jdbc.PhoenixStatement.parseStatement(PhoenixStatement.java:1368)
      	at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1439)
      	at org.apache.phoenix.util.UpgradeUtil.disableViewIndexes(UpgradeUtil.java:599)
      	at org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2482)
      	at org.apache.phoenix.query.ConnectionQueryServicesImpl$13.call(ConnectionQueryServicesImpl.java:2300)
      	at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:78)
      	at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2300)
      	at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:231)
      	at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:142)
      

      Ping Samarth Jain. Handling this as part of PHOENIX-3002

        Attachments

          Activity

            People

            • Assignee:
              rajeshbabu Rajeshbabu Chintaguntla
              Reporter:
              rajeshbabu Rajeshbabu Chintaguntla
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: