[doc]The deletion operation requires the equivalence condition of the primary key#1201
Conversation
luoyuxia
left a comment
There was a problem hiding this comment.
@ZmmBigdata Thanks for the pr. Left minor comments. PTAL
|
|
||
| -- Update | ||
| INSERT INTO T(k, v1, v2) VALUES (2, 2.0, 't2'); | ||
| -- 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. |
There was a problem hiding this comment.
nit
| -- 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. | |
| -- Switch to batch mode to perform update operation for UPDATE statement is only supported for batch mode currently |
| -- Delete | ||
| DELETE FROM T WHERE k > 2; | ||
| SELECT * FROM T; | ||
| DELETE FROM T WHERE k = 2; |
There was a problem hiding this comment.
Why change it? If switch to batch mode, I think DELETE FROM T WHERE k > 2; can be supported then?
There was a problem hiding this comment.
Switch to batch processing mode, Flinksql client also cannot execute. I already verified it last night
There was a problem hiding this comment.
@luoyuxia In the first picture, it has been switched to batch mode, but the delete operation still cannot be performed
There was a problem hiding this comment.
Thanks for explaination. Haven't been aware of it
| DELETE FROM T WHERE k > 2; | ||
| SELECT * FROM T; | ||
| DELETE FROM T WHERE k = 2; | ||
| SELECT * FROM T WHERE k = 2; |
There was a problem hiding this comment.
I means why not keep SELECT * FROM T;?
There was a problem hiding this comment.
Why change it?
There is another way:
DELETE FROM T WHERE k = 2;
SET execution.runtime-mode = batch;
SELECT * FROM T;
Which one do you think is good
There was a problem hiding this comment.
I prefer not change the origin context if the origin context works:
SELECT * FROM T;
-- Output:
+----+-----+----+
| k | v1 | v2 |
+----+-----+----+
| 1 | 1.0 | t2 |
+----+-----+----+
There was a problem hiding this comment.
I prefer not change the origin context if the origin context works:
SELECT * FROM T; -- Output: +----+-----+----+ | k | v1 | v2 | +----+-----+----+ | 1 | 1.0 | t2 | +----+-----+----+
Need to add another statement to switch back to streaming mode:
SET execution.runtime-mode = streaming;
There was a problem hiding this comment.
I prefer not change the origin context if the origin context works:
SELECT * FROM T; -- Output: +----+-----+----+ | k | v1 | v2 | +----+-----+----+ | 1 | 1.0 | t2 | +----+-----+----+
DELETE FROM T WHERE k = 2;
【SET execution.runtime-mode = streaming;】
SELECT * FROM T;
Add a statement and switch back to streaming mode to keep the select statement unchanged
There was a problem hiding this comment.
Ok, let's add a statement to switch to streaming mode.
There was a problem hiding this comment.
Ok, let's add a statement to switch to streaming mode.
ok, I'll make changes
There was a problem hiding this comment.
Ok, let's add a statement to switch to streaming mode.
@luoyuxia I have resubmitted according to the suggestion

Purpose
Linked issue: close #xxx
What is the purpose of the change:

https://alibaba.github.io/fluss-docs/docs/table-design/table-types/pk-table/merge-engines/default/
The deletion operation requires the equivalence condition of the primary key
Brief change log
Please describe the changes:
API and Format
Does this change affect API or storage format:
本次修改仅调整了 SQL 查询语句和表结构定义,不影响对外 API 或数据存储格式。
Documentation
Does this change introduce a new feature:
本次修改是对现有功能的修复和优化,无需新增文档。