gustavodemorais commented on code in PR #28235:
URL: https://github.com/apache/flink/pull/28235#discussion_r3312058552
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/stream/StreamExecProcessTableFunction.java:
##########
@@ -121,6 +123,10 @@ public class StreamExecProcessTableFunction extends
ExecNodeBase<RowData>
@JsonProperty(FIELD_NAME_OUTPUT_CHANGELOG_MODE)
private final ChangelogMode outputChangelogMode;
+ @JsonProperty(value = FIELD_NAME_INPUT_UPSERT_KEYS, defaultValue = "[]")
+ @JsonInclude(JsonInclude.Include.NON_DEFAULT)
Review Comment:
For omit-when-empty + backwards compat, use:
```
@JsonProperty(FIELD_NAME_INPUT_UPSERT_KEYS)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
```
and also
```
private final List<int[]> inputUpsertKeys;
and in the @JsonCreator, null-coalesce: this.inputUpsertKeys =
inputUpsertKeys != null ? inputUpsertKeys : Collections.emptyList();.
```
NON_EMPTY omits both null and empty lists from JSON. The null-coalesce
handles old plans (missing field → null → empty). Drop defaultValue = "[]",
Jackson treats it as docs only.
--
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]