Jingsong Lee created FLINK-15407:
------------------------------------
Summary: Add document to explain how to write a table with PK
Key: FLINK-15407
URL:
https://issues.apache.org/jira/browse/FLINK-15407 Project: Flink
Issue Type: Bug
Components: Documentation, Table SQL / API
Reporter: Jingsong Lee
Fix For: 1.10.0
I have had several user problems:
Why is an error reported when writing the upsertsink: TableException: UpsertStreamTableSink requires that Table has a full primary keys if it is updated.
Users are confused.
I think we can consider writing a document to describe it.
User need careful like:
{code:java}
insert into result_table select pk1, if(pk2 is null, '', pk2) as pk2, count(*), sum(f3) from source group by pk1, pk2; {code}
This will failed.
{code:java}
insert into result_table select pk1, pk2, count(*), sum(f1) from (select pk1, if(pk2 is null, '', pk2) as pk2, f1 from source) group by pk1, pk2;
{code}
This can work.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)