Skip to content

Commit d4ac055

Browse files
committed
[doc]The deletion operation requires the equivalence condition of the primary key
1 parent cd86a6b commit d4ac055

File tree

1 file changed

+9
-7
lines changed
  • website/docs/table-design/table-types/pk-table/merge-engines

1 file changed

+9
-7
lines changed

website/docs/table-design/table-types/pk-table/merge-engines/default.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ SELECT * FROM T WHERE k = 1;
5454

5555
-- Update
5656
INSERT INTO T(k, v1, v2) VALUES (2, 2.0, 't2');
57-
-- Switch to batch mode to perform update operation, otherwise an error will be reported: org.apache.flink.table.api.TableException: UPDATE statement is not supported for streaming mode now.
57+
-- Switch to batch mode to perform update operation for UPDATE statement is only supported for batch mode currently
5858
SET execution.runtime-mode = batch;
5959
UPDATE T SET v1 = 4.0 WHERE k = 2;
6060
SELECT * FROM T WHERE k = 2;
@@ -86,11 +86,13 @@ SELECT * FROM T WHERE k = 3;
8686

8787
-- Delete
8888
DELETE FROM T WHERE k = 2;
89-
SELECT * FROM T WHERE k = 2;
89+
-- Switch to streaming mode
90+
SET execution.runtime-mode = streaming;
91+
SELECT * FROM T;
9092
-- Output:
91-
+----+-----+------+
92-
| k | v1 | v2 |
93-
+----+-----+------+
94-
|null| null| null |
95-
+----+-----+------+
93+
+----+-----+----+
94+
| k | v1 | v2 |
95+
+----+-----+----+
96+
| 1 | 1.0 | t2 |
97+
+----+-----+----+
9698
```

0 commit comments

Comments
 (0)