You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pv...@apache.org on 2022/03/17 11:25:34 UTC
[hive] branch master updated: HIVE-26040: Fix DirectSqlUpdateStat.getNextCSIdForMPartitionColumnStatistics for mssql (Peter Vary reviewed by Marton Bod) (#3112)
This is an automated email from the ASF dual-hosted git repository.
pvary pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 1213ad3 HIVE-26040: Fix DirectSqlUpdateStat.getNextCSIdForMPartitionColumnStatistics for mssql (Peter Vary reviewed by Marton Bod) (#3112)
1213ad3 is described below
commit 1213ad3f0ae0e21e7519dc28b8b6d1401cdd1441
Author: pvary <pv...@cloudera.com>
AuthorDate: Thu Mar 17 12:25:13 2022 +0100
HIVE-26040: Fix DirectSqlUpdateStat.getNextCSIdForMPartitionColumnStatistics for mssql (Peter Vary reviewed by Marton Bod) (#3112)
---
.../java/org/apache/hadoop/hive/metastore/DirectSqlUpdateStat.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlUpdateStat.java b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlUpdateStat.java
index 6bd1c3d..648fb0d 100644
--- a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlUpdateStat.java
+++ b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/DirectSqlUpdateStat.java
@@ -668,9 +668,9 @@ class DirectSqlUpdateStat {
// the caller gets a reserved range for CSId not used by any other thread.
boolean insertDone = false;
while (maxCsId == 0) {
- String query = "SELECT \"NEXT_VAL\" FROM \"SEQUENCE_TABLE\" WHERE \"SEQUENCE_NAME\"= "
- + quoteString("org.apache.hadoop.hive.metastore.model.MPartitionColumnStatistics")
- + " FOR UPDATE";
+ String query = sqlGenerator.addForUpdateClause("SELECT \"NEXT_VAL\" FROM \"SEQUENCE_TABLE\" "
+ + "WHERE \"SEQUENCE_NAME\"= "
+ + quoteString("org.apache.hadoop.hive.metastore.model.MPartitionColumnStatistics"));
LOG.debug("Going to execute query " + query);
statement = dbConn.createStatement();
rs = statement.executeQuery(query);