suxiaogang223 commented on code in PR #56257:
URL: https://github.com/apache/doris/pull/56257#discussion_r2366665857
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/action/IcebergFastForwardAction.java:
##########
@@ -65,7 +71,49 @@ protected void validateIcebergAction() throws UserException {
@Override
protected List<String> executeAction(TableIf table) throws UserException {
- throw new DdlException("Iceberg fast_forward procedure is not
implemented yet");
+ Table icebergTable = ((IcebergExternalTable) table).getIcebergTable();
+
+ String sourceBranch = namedArguments.getString(BRANCH);
+ String desBranch = namedArguments.getString(TO);
+
+ if (sourceBranch == null || sourceBranch.trim().isEmpty()) {
+ throw new UserException("branch parameter is required for
fast_forward operation");
+ }
+
+ if (desBranch == null) {
+ throw new UserException("to parameter is required for fast_forward
operation");
+ }
Review Comment:
same problem
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/action/IcebergCherrypickSnapshotAction.java:
##########
@@ -65,7 +71,42 @@ protected void validateIcebergAction() throws UserException {
@Override
protected List<String> executeAction(TableIf table) throws UserException {
- throw new DdlException("Iceberg cherrypick_snapshot procedure is not
implemented yet");
+ Table icebergTable = ((IcebergExternalTable) table).getIcebergTable();
+
+ Long sourceSnapshotId = namedArguments.getLong(SNAPSHOT_ID);
+ if (sourceSnapshotId == null) {
+ throw new UserException("snapshot_id parameter is required for
cherry-pick operation");
+ }
Review Comment:
Assert is only needed here because ArgumentParser has checked the required
parameters for us.
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/action/IcebergRollbackToTimestampAction.java:
##########
@@ -87,7 +96,41 @@ protected void validateIcebergAction() throws UserException {
@Override
protected List<String> executeAction(TableIf table) throws UserException {
- throw new DdlException("Iceberg rollback_to_timestamp procedure is not
implemented yet");
+ Table icebergTable = ((IcebergExternalTable) table).getIcebergTable();
+
+ String timestampStr = namedArguments.getString(TIMESTAMP);
+ if (timestampStr == null || timestampStr.trim().isEmpty()) {
+ throw new UserException("timestamp parameter is required for
rollback_to_timestamp operation");
+ }
Review Comment:
same problem
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/action/IcebergRollbackToSnapshotAction.java:
##########
@@ -62,7 +69,47 @@ protected void validateIcebergAction() throws UserException {
@Override
protected List<String> executeAction(TableIf table) throws UserException {
- throw new DdlException("Iceberg rollback_to_snapshot procedure is not
implemented yet");
+ Table icebergTable = ((IcebergExternalTable) table).getIcebergTable();
+
+ Long targetSnapshotId = namedArguments.getLong(SNAPSHOT_ID);
+ if (targetSnapshotId == null) {
+ throw new UserException("snapshot_id parameter is required for
rollback operation");
+ }
Review Comment:
same problem
--
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]