[ 
https://issues.apache.org/jira/browse/HIVE-27234?focusedWorklogId=859879&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-859879
 ]

ASF GitHub Bot logged work on HIVE-27234:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/May/23 14:55
            Start Date: 01/May/23 14:55
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on code in PR #4216:
URL: https://github.com/apache/hive/pull/4216#discussion_r1181520628


##########
parser/src/java/org/apache/hadoop/hive/ql/parse/AlterClauseParser.g:
##########
@@ -477,6 +478,34 @@ alterStatementSuffixExecute
     -> ^(TOK_ALTERTABLE_EXECUTE KW_SET_CURRENT_SNAPSHOT $snapshotParam)
     ;
 
+alterStatementSuffixCreateBranch
+@init { gParent.pushMsg("alter table create branch", state); }
+@after { gParent.popMsg(state); }
+    : KW_CREATE KW_BRANCH branchName=identifier snapshotIdOfBranch? 
branchRetain? retentionOfSnapshots?
+    -> ^(TOK_ALTERTABLE_CREATE_BRANCH $branchName snapshotIdOfBranch? 
branchRetain? retentionOfSnapshots?)
+    ;
+
+snapshotIdOfBranch
+@init { gParent.pushMsg("alter table create branch as of version", state); }

Review Comment:
   should we support `as of timestamp` as well? Note, that syntax is different 
from the 'select' statement:
   ````
   FOR SYSTEM_VERSION AS OF
   FOR SYSTEM_TIME AS OF
   ````
   i think we should be consistent here, WDYT? cc @ayushtkn 





Issue Time Tracking
-------------------

    Worklog Id:     (was: 859879)
    Time Spent: 5h  (was: 4h 50m)

> Iceberg:  CREATE BRANCH SQL implementation
> ------------------------------------------
>
>                 Key: HIVE-27234
>                 URL: https://issues.apache.org/jira/browse/HIVE-27234
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Iceberg integration
>            Reporter: zhangbutao
>            Assignee: zhangbutao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 5h
>  Remaining Estimate: 0h
>
> Maybe we can follow spark sql about branch ddl implementation 
> [https://github.com/apache/iceberg/pull/6617]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to