mxm commented on code in PR #18668:
URL: https://github.com/apache/iceberg/pull/18668#discussion_r4470470175
##########
docs/docs/flink-writes.md:
##########
@@ -516,6 +516,7 @@ We need the following information (DynamicRecord) for every
record:
| `Parallelism` | The maximum number of parallel writers for a given
table/branch/schema/spec (WriteTarget). |
| `UpsertMode` | Overrides this table's write.upsert.enabled (optional).
|
| `EqualityFields` | The equality fields for the table (optional). When
unset, the dynamic sink falls back to the schema's identifier fields for both
distribution (records sharing a key route to the same writer) and
equality-delete inference. Identifier fields do not auto-enable upsert mode —
that flag remains opt-in. |
+| `DistributionFields` | The fields to hash records by when the distribution
mode is `HASH` (optional). When set, they replace the partition key and
equality fields as the hash key. Ignored for other distribution modes. |
Review Comment:
Could we mention the subset rule here?
```suggestion
| `DistributionFields` | The fields to hash records by when the distribution
mode is `HASH` (optional). When set, they replace the partition key and
equality fields as the hash key. If equality fields are set, the distribution
fields must be a subset of them. The same applies to the schema's identifier
fields if equality fields are unset. Ignored for other distribution modes. |
```
##########
docs/docs/flink-writes.md:
##########
@@ -585,7 +586,7 @@ The `DistributionMode` set on each `DynamicRecord` controls
how that record is r
| Mode | Behavior
|
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `NONE` | Records are distributed across writer subtasks in a round-robin
fashion (or by equality fields if set).
|
-| `HASH` | Records are distributed by partition key (partitioned tables) or
equality fields (unpartitioned tables). Ensures that records for the same
partition are handled by the same writer subtask. |
+| `HASH` | Records are distributed by the distribution fields if set,
otherwise by partition key (partitioned tables) or equality fields
(unpartitioned tables). Ensures that records for the same partition are handled
by the same writer subtask. |
Review Comment:
NIT: The last sentence doesn't hold with distribution fields.
```suggestion
| `HASH` | Records are distributed by the distribution fields if set,
otherwise by partition key (partitioned tables) or equality fields
(unpartitioned tables). Without distribution fields, records for the same
partition are handled by the same writer subtask. |
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]