[
https://issues.apache.org/jira/browse/HIVE-21160?focusedWorklogId=777510&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-777510
]
ASF GitHub Bot logged work on HIVE-21160:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Jun/22 13:18
Start Date: 02/Jun/22 13:18
Worklog Time Spent: 10m
Work Description: kasakrisz commented on code in PR #2855:
URL: https://github.com/apache/hive/pull/2855#discussion_r887942105
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java:
##########
@@ -91,23 +110,15 @@ private void analyzeDelete(ASTNode tree) throws
SemanticException {
* The sort by clause is put in there so that records come out in the right
order to enable
* merge on read.
*/
- private void reparseAndSuperAnalyze(ASTNode tree) throws SemanticException {
+ private void reparseAndSuperAnalyze(ASTNode tree, ASTNode tabNameNode, Table
mTable) throws SemanticException {
List<? extends Node> children = tree.getChildren();
- // The first child should be the table we are updating / deleting from
- ASTNode tabName = (ASTNode)children.get(0);
- assert tabName.getToken().getType() == HiveParser.TOK_TABNAME :
- "Expected tablename as first child of " + operation + " but found " +
tabName.getName();
- Table mTable = getTargetTable(tabName);
- validateTxnManager(mTable);
- validateTargetTable(mTable);
-
// save the operation type into the query state
SessionStateUtil.addResource(conf,
Context.Operation.class.getSimpleName(), operation.name());
StringBuilder rewrittenQueryStr = new StringBuilder();
rewrittenQueryStr.append("insert into table ");
- rewrittenQueryStr.append(getFullTableNameForSQL(tabName));
+ rewrittenQueryStr.append(getFullTableNameForSQL(tabNameNode));
Review Comment:
It is also used in `MergeSemanticAnalyzer`
```
String targetName = getSimpleTableName(targetNameNode);
...
appendTarget(rewrittenQueryStr, targetNameNode, targetName);
...
```
and in `AcidExportSemanticAnalyzer`
```
StringBuilder rewrittenQueryStr = generateExportQuery(
newTable.getPartCols(), tokRefOrNameExportTable, (ASTNode)
tokRefOrNameExportTable.parent, newTableName);
```
Issue Time Tracking
-------------------
Worklog Id: (was: 777510)
Time Spent: 4h (was: 3h 50m)
> 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
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)