kasakrisz commented on code in PR #5839:
URL: https://github.com/apache/hive/pull/5839#discussion_r2151537751


##########
ql/src/java/org/apache/hadoop/hive/ql/session/SessionStateUtil.java:
##########
@@ -99,12 +107,34 @@ public static void addCommitInfo(
 
     getCommitInfo(conf, tableName)
         .ifPresentOrElse(commitInfoMap -> commitInfoMap.put(jobId, commitInfo),
-              () -> {
-                Map<String, CommitInfo> newCommitInfoMap = Maps.newHashMap();
-                newCommitInfoMap.put(jobId, commitInfo);
+            () -> {
+              Map<String, CommitInfo> newCommitInfoMap = Maps.newHashMap();
+              newCommitInfoMap.put(jobId, commitInfo);
 
-                addResource(conf, COMMIT_INFO_PREFIX + tableName, 
newCommitInfoMap);
-              });
+              addResource(conf, COMMIT_INFO_PREFIX + tableName, 
newCommitInfoMap);
+            });
+  }
+
+  public static Optional<ExprNodeGenericFuncDesc> 
getConflictDetectionFilter(Configuration conf, Object tableName) {
+    return getResource(conf, CONFLICT_DETECTION_FILTER + tableName)
+        .map(obj -> (ExprNodeGenericFuncDesc) obj);
+  }
+
+  public static void setConflictDetectionFilter(Configuration conf, String 
tableName, ExprNodeDesc filterExpr) {
+    String key = CONFLICT_DETECTION_FILTER + tableName;
+
+    getConflictDetectionFilter(conf, tableName)
+        .ifPresentOrElse(prevFilterExpr -> {
+            if (!prevFilterExpr.isSame(filterExpr)) {
+              ExprNodeDesc disjunction = null;
+              try {
+                disjunction = ExprNodeDescUtils.disjunction(prevFilterExpr, 
filterExpr);
+              } catch (UDFArgumentException e) {
+                LOG.warn(e.getMessage());

Review Comment:
   This doesn't print the stack trace.



-- 
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.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to