Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22663

Quote all table and column names or do not quote any

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

      Description

      The change in HIVE-22546 is causing following stack trace when I run Hive with PostgreSQL as backend db for the metastore.

      0: jdbc:hive2://localhost:10000> create database dumpdb with ('repl.source.for'='1,2,3');0: jdbc:hive2://localhost:10000> create database dumpdb with ('repl.source.for'='1,2,3');Error: Error while compiling statement: FAILED: ParseException line 1:28 missing KW_DBPROPERTIES at '(' near '<EOF>' (state=42000,code=40000)0: jdbc:hive2://localhost:10000> create database dumpdb with dbproperties ('repl.source.for'='1,2,3');ERROR : FAILED: Hive Internal Error: org.apache.hadoop.hive.ql.lockmgr.LockException(Error communicating with the metastore)org.apache.hadoop.hive.ql.lockmgr.LockException: Error communicating with the metastore at org.apache.hadoop.hive.ql.lockmgr.DbTxnManager.commitTxn(DbTxnManager.java:541) at org.apache.hadoop.hive.ql.Driver.releaseLocksAndCommitOrRollback(Driver.java:687) at org.apache.hadoop.hive.ql.Driver.releaseLocksAndCommitOrRollback(Driver.java:653) at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:969)

      ... stack trace clipped

      java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)Caused by: MetaException(message:Unable to update transaction database org.postgresql.util.PSQLException: ERROR: relation "materialization_rebuild_locks" does not exist  Position: 13 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) at 

      This happens because the table names in all the queries in TxnHandler.java (including the one at 1312, which causes this stack trace) are not quoting the table names. All the tablenames and column names should be quoted there. Just the change in HIVE-22546 won't suffice.

        Attachments

        1. HIVE-22663.6.patch
          97 kB
          Zoltan Chovan
        2. HIVE-22663.5.patch
          97 kB
          Zoltan Chovan
        3. HIVE-22663.4.patch
          97 kB
          Zoltan Chovan
        4. HIVE-22663.3.patch
          97 kB
          Zoltan Chovan
        5. HIVE-22663.2.patch
          97 kB
          Zoltan Chovan
        6. HIVE-22663.patch
          97 kB
          Zoltan Chovan

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              zchovan Zoltan Chovan Assign to me
              Reporter:
              ashutosh.bapat Ashutosh Bapat

              Dates

              • Created:
                Updated:
                Resolved:

              Time Tracking

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

                Issue deployment