zhangbutao commented on code in PR #4641:
URL: https://github.com/apache/hive/pull/4641#discussion_r1313840028


##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/execute/AlterTableExecuteAnalyzer.java:
##########
@@ -124,6 +126,11 @@ protected void analyzeCommand(TableName tableName, 
Map<String, String> partition
       AlterTableExecuteSpec spec =
           new AlterTableExecuteSpec(FAST_FORWARD, new 
FastForwardSpec(branchName, targetBranchName));
       desc = new AlterTableExecuteDesc(tableName, partitionSpec, spec);
+    } else if (HiveParser.KW_CHERRY_PICK == executeCommandType.getType()) {
+      ASTNode child = (ASTNode) command.getChild(1);
+      long snapshotId = Long.parseLong(child.getText());
+      AlterTableExecuteSpec spec = new AlterTableExecuteSpec(CHERRY_PICK, new 
CherryPickSpec(snapshotId));
+      desc = new AlterTableExecuteDesc(tableName, partitionSpec, spec);

Review Comment:
   IMO it's good enough. It's more clearly than before. Thx.



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