You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/21 10:00:29 UTC

[GitHub] [flink-table-store] LadyForest commented on a diff in pull request #98: [FLINK-26457] Introduce PartialUpdateMergeFunction

LadyForest commented on code in PR #98:
URL: https://github.com/apache/flink-table-store/pull/98#discussion_r855008375


##########
docs/content/docs/development/create-table.md:
##########
@@ -233,3 +233,37 @@ The two methods do not behave in the same way when querying.
 Use approach one if you have a large number of filtered queries
 with only `user_id`, and use approach two if you have a large
 number of filtered queries with only `catalog_id`.
+
+## Partial Update
+
+You can configure partial update from options:
+
+```sql
+CREATE TABLE MyTable (
+  product_id BIGINT,
+  price DOUBLE,
+  number BIGINT,
+  detail STRING,
+  PRIMARY KEY (product_id) NOT ENFORCED
+) WITH (
+  'merge-engine' = 'partial-update'
+);
+```
+
+{{< hint info >}}
+__Note:__ Partial update is only supported for table with primary key.
+{{< /hint >}}
+
+{{< hint info >}}
+__Note:__ Partial update is not supported for streaming consuming.
+{{< /hint >}}
+
+The value fields are updated to the latest data one by one
+under the same primary key, but null values are not overwritten.
+
+For example, the inputs: 
+- 1, 23.0, 10,   NULL
+- 1, NULL, 20,   'This is a book'
+- 1, 25.2, NULL, NULL
+
+Output: <1, 25.2, 20, 'This is a book'>

Review Comment:
   Nit: keep format consistent
   
   For example, the inputs:  
   - `<1, 23.0, 10, NULL>`
   - `<1, NULL, 20, 'This is a book'>`
   - `<1, 25.2, NULL, NULL>`
   
   Output:  
   - `<1, 25.2, 20, 'This is a book'>`



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org