ramitg254 commented on code in PR #6413:
URL: https://github.com/apache/hive/pull/6413#discussion_r3450644096


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/rewrite/SplitUpdateRewriter.java:
##########
@@ -134,4 +116,40 @@ public ParseUtils.ReparseResult rewrite(Context context, 
UpdateStatement updateB
 
     return rr;
   }
+
+  private void appendUpdateColumn(UpdateStatement updateBlock,
+               MultiInsertSqlGenerator sqlGenerator, List<String> insertValues,
+               Map<Integer, ASTNode> setColExprs, String columnName, int 
setColExprIndex, int columnOffset,
+               boolean appendToSelect, boolean prependComma) {
+    String identifier = HiveUtils.unparseIdentifier(columnName, conf);
+
+    // The insert value is placed for every column (data and partition).
+    int index = updateBlock.getTargetTable().getColumnIndexByName(columnName);
+    insertValues.set(index, sqlGenerator.qualify(identifier));
+
+    // Native tables: partition cols are already in the subquery SELECT 
(appendAcidSelectColumns).
+    // Non-native tables: appendAcidSelectColumns exposes only delete-prefixed 
aliases, so add plain names below (appendToSelect).
+    if (!appendToSelect) {
+      return;
+    }

Review Comment:
   done
   ( FYI: updating partition column works for iceberg table already but not for 
native tables)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to