[
https://issues.apache.org/jira/browse/HIVE-21160?focusedWorklogId=777514&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-777514
]
ASF GitHub Bot logged work on HIVE-21160:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Jun/22 13:19
Start Date: 02/Jun/22 13:19
Worklog Time Spent: 10m
Work Description: kasakrisz commented on code in PR #2855:
URL: https://github.com/apache/hive/pull/2855#discussion_r887943545
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -8292,8 +8294,8 @@ private WriteEntity generateTableWriteEntity(String dest,
Table dest_tab,
if ((dpCtx == null || dpCtx.getNumDPCols() == 0)) {
output = new WriteEntity(dest_tab, determineWriteType(ltd, dest));
if (!outputs.add(output)) {
- if(!((this instanceof MergeSemanticAnalyzer) &&
- conf.getBoolVar(ConfVars.MERGE_SPLIT_UPDATE))) {
+ if(!((this instanceof MergeSemanticAnalyzer || this instanceof
UpdateDeleteSemanticAnalyzer) &&
Review Comment:
Extracted to instance method.
##########
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java:
##########
@@ -251,6 +252,44 @@ public void testExceucteUpdateCounts() throws Exception {
assertEquals("1 row PreparedStatement update", 1, count);
}
+ @Test
+ public void testExceucteMergeCounts() throws Exception {
+ testExceucteMergeCounts(true);
+ }
+
+ @Test
+ public void testExceucteMergeCountsNoSplitUpdate() throws Exception {
+ testExceucteMergeCounts(false);
+ }
+
+ private void testExceucteMergeCounts(boolean splitUpdateEarly) throws
Exception {
+
+ Statement stmt = con.createStatement();
+ stmt.execute("set " + ConfVars.MERGE_SPLIT_UPDATE.varname + "=" +
splitUpdateEarly);
+ stmt.execute("set " + ConfVars.HIVE_SUPPORT_CONCURRENCY.varname + "=true");
Review Comment:
Changed to SPLIT_UPDATE
Issue Time Tracking
-------------------
Worklog Id: (was: 777514)
Time Spent: 4h 20m (was: 4h 10m)
> Rewrite Update statement as Multi-insert and do Update split early
> ------------------------------------------------------------------
>
> Key: HIVE-21160
> URL: https://issues.apache.org/jira/browse/HIVE-21160
> Project: Hive
> Issue Type: Sub-task
> Components: Transactions
> Affects Versions: 3.0.0
> Reporter: Eugene Koifman
> Assignee: Krisztian Kasa
> Priority: Major
> Labels: pull-request-available
> Time Spent: 4h 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)