[ https://issues.apache.org/jira/browse/HIVE-27031?focusedWorklogId=844721&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-844721 ]
ASF GitHub Bot logged work on HIVE-27031: ----------------------------------------- Author: ASF GitHub Bot Created on: 10/Feb/23 08:28 Start Date: 10/Feb/23 08:28 Worklog Time Spent: 10m Work Description: deniskuzZ commented on code in PR #4026: URL: https://github.com/apache/hive/pull/4026#discussion_r1102426977 ########## ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java: ########## @@ -145,11 +162,21 @@ private void reparseAndSuperAnalyze(ASTNode tree, Table mTable, ASTNode tabNameN where = (ASTNode)children.get(whereIndex); assert where.getToken().getType() == HiveParser.TOK_WHERE : "Expected where clause, but found " + where.getName(); - } - // Add a sort by clause so that the row ids come out in the correct order - appendSortBy(rewrittenQueryStr, columnAppender.getSortKeys()); + if (shouldOverwrite) { + assert where.getChildCount() < 2 : "Overwrite mode not supported with more than 1 children in where clause."; + for (int i = 0; i < where.getChildCount(); i++) { Review Comment: if we expect just 1 child why not skip the loop and access it via the index? ```` if (where.getChildCount() == 1) { ASTNode node = new ASTNode(new CommonToken(HiveParser.KW_NOT, "!")); node.addChild(where.getChild(0)); where.setChild(0, node); } ```` Issue Time Tracking ------------------- Worklog Id: (was: 844721) Time Spent: 1h 50m (was: 1h 40m) > Iceberg: Implement Copy-On-Write for Delete Queries > --------------------------------------------------- > > Key: HIVE-27031 > URL: https://issues.apache.org/jira/browse/HIVE-27031 > Project: Hive > Issue Type: Sub-task > Reporter: Ayush Saxena > Assignee: Ayush Saxena > Priority: Major > Labels: pull-request-available > Time Spent: 1h 50m > Remaining Estimate: 0h > > Implement copy on write mode for deletes for iceberg tables -- This message was sent by Atlassian Jira (v8.20.10#820010)