This is an automated email from the ASF dual-hosted git repository.
sankarh pushed a commit to branch branch-3
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/branch-3 by this push:
new ab494206e9b HIVE-27615: Backport of HIVE-21280: Null pointer
exception on running compaction against a MM table (Aditya Shah via Ashutosh
Chauhan)
ab494206e9b is described below
commit ab494206e9b69e3f3883b64cb42d181b091273c6
Author: Aman Raj <[email protected]>
AuthorDate: Tue Aug 22 13:03:13 2023 +0530
HIVE-27615: Backport of HIVE-21280: Null pointer exception on running
compaction against a MM table (Aditya Shah via Ashutosh Chauhan)
Signed-off-by: Sankar Hariappan <[email protected]>
Closes (#4595)
---
ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java | 2 +-
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java
b/ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java
index 8228109751b..32b447c4f44 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/DriverUtils.java
@@ -33,7 +33,7 @@ public class DriverUtils {
SessionState.setCurrentSessionState(sessionState);
boolean isOk = false;
try {
- QueryState qs = new
QueryState.Builder().withHiveConf(conf).nonIsolated().build();
+ QueryState qs = new
QueryState.Builder().withHiveConf(conf).withGenerateNewQueryId(true).nonIsolated().build();
Driver driver = new Driver(qs, user, null, null);
driver.setCompactionWriteIds(writeIds);
try {
diff --git
a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
index 474f6c53426..d7e661bcd26 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/CompactorMR.java
@@ -354,7 +354,7 @@ public class CompactorMR {
conf.set(ConfVars.HIVE_QUOTEDID_SUPPORT.varname, "column");
String user = UserGroupInformation.getCurrentUser().getShortUserName();
- SessionState sessionState = DriverUtils.setUpSessionState(conf, user,
false);
+ SessionState sessionState = DriverUtils.setUpSessionState(conf, user,
true);
// Note: we could skip creating the table and just add table type stuff
directly to the
// "insert overwrite directory" command if there were no bucketing
or list bucketing.