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


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/MergeSemanticAnalyzer.java:
##########
@@ -470,8 +405,7 @@ private String handleUpdate(ASTNode 
whenMatchedUpdateClause, StringBuilder rewri
       rewrittenQueryStr.append(" AND 
NOT(").append(deleteExtraPredicate).append(")");
     }
     if(!splitUpdateEarly) {
-      rewrittenQueryStr.append("\n SORT BY ");
-      rewrittenQueryStr.append(targetName).append(".ROW__ID ");
+      appendSortBy(rewrittenQueryStr, Collections.singletonList(targetName + 
".ROW__ID "));
     }
     rewrittenQueryStr.append("\n");

Review Comment:
   Hive already write the rewritten sql string to the log
   
https://github.com/apache/hive/blob/1e3e07c87e71dc16f05ad269b250d65ad7c02232/ql/src/java/org/apache/hadoop/hive/ql/parse/RewriteSemanticAnalyzer.java#L271
   
   It is does not contains the transformations which is performed on the 
reparsed Ast. 



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