hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-22663) Quote all table and column names or do not quote any
Date Mon, 13 Jan 2020 14:31:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-22663?focusedWorklogId=370802&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-370802
]

ASF GitHub Bot logged work on HIVE-22663:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Jan/20 14:30
            Start Date: 13/Jan/20 14:30
    Worklog Time Spent: 10m 
      Work Description: pvary commented on pull request #875: HIVE-22663: Quote all table
and column names or do not quote any
URL: https://github.com/apache/hive/pull/875#discussion_r365833755
 
 

 ##########
 File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
 ##########
 @@ -368,7 +368,7 @@ public GetOpenTxnsInfoResponse getOpenTxnsInfo() throws MetaException
{
          */
         dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
         stmt = dbConn.createStatement();
-        String s = "select ntxn_next - 1 from NEXT_TXN_ID";
+        String s = "select \"NTXN_NEXT\" - 1 from \"NEXT_TXN_ID\"";
 
 Review comment:
   You have not capitalized this. Is this intentional?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 370802)
    Time Spent: 20m  (was: 10m)

> Quote all table and column names or do not quote any
> ----------------------------------------------------
>
>                 Key: HIVE-22663
>                 URL: https://issues.apache.org/jira/browse/HIVE-22663
>             Project: Hive
>          Issue Type: Bug
>          Components: HiveServer2, Standalone Metastore
>    Affects Versions: 4.0.0
>            Reporter: Ashutosh Bapat
>            Assignee: Zoltan Chovan
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22663.2.patch, HIVE-22663.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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.



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

Mime
View raw message