liyubin117 opened a new pull request, #5413:
URL: https://github.com/apache/paimon/pull/5413

   <!-- Please specify the module before the PR name: [core] ... or [flink] ... 
-->
   
   ### Purpose
   
   ```
   Flink SQL> create table branch12(id int);
   [INFO] Execute statement succeeded.
   
   Flink SQL> call sys.create_branch('default.branch12','b1');
   +---------+
   |  result |
   +---------+
   | Success |
   +---------+
   1 row in set
   
   Flink SQL> insert into branch12 values (1),(2);
   [INFO] Submitting SQL update statement to the cluster...
   [INFO] SQL update statement has been successfully submitted to the cluster:
   Job ID: 411cafe166d80987b061b3ef76e443e8
   
   
   Flink SQL> insert into branch12$branch_b1 values (3),(4),(5);
   [INFO] Submitting SQL update statement to the cluster...
   [INFO] SQL update statement has been successfully submitted to the cluster:
   Job ID: 934cfd698d6b0383504bffeba9957283
   
   Flink SQL> select count(1) from branch12;
   +--------+
   | EXPR$0 |
   +--------+
   |      2 |
   +--------+
   1 row in set (0.84 seconds)
   
   Flink SQL> select count(1) from branch12$branch_b1;
   +--------+
   | EXPR$0 |
   +--------+
   |      3 |
   +--------+
   1 row in set (0.69 seconds)
   
   Flink SQL> alter table branch12 set ('branch'='b1');
   [INFO] Execute statement succeeded.
   
   Flink SQL> call sys.fast_forward('default.branch12','b1');
   +---------+
   |  result |
   +---------+
   | Success |
   +---------+
   1 row in set
   
   Flink SQL> select count(1) from branch12;
   +--------+
   | EXPR$0 |
   +--------+
   |      0 |
   +--------+
   1 row in set (0.79 seconds)
   
   Flink SQL> select count(1) from branch12$branch_b1;
   +--------+
   | EXPR$0 |
   +--------+
   |      0 |
   +--------+
   1 row in set (0.58 seconds)
   ```
   
   <!-- What is the purpose of the change -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


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

Reply via email to