gyfora commented on code in PR #29011:
URL: https://github.com/apache/flink/pull/29011#discussion_r4002212457
##########
flink-libraries/flink-state-processing-api/src/main/java/org/apache/flink/state/api/StateTableUtils.java:
##########
@@ -262,56 +335,42 @@ private static CatalogTable buildKeyedCatalogTable(
if (windowType == null) {
schemaBuilder.primaryKeyNamed("PK_state_key", "state_key");
}
+ // No formal PK on the window table: Flink's PK validation for
arbitrary (including
+ // zero-field) ROW columns like state_window is unreliable. Row
identity is still
+ // conceptually (state_key, state_window).
Schema schema = schemaBuilder.build();
Map<String, String> options = buildBaseConnectorOptions(statePath,
operatorIdentifier);
- options.put(
- SavepointConnectorOptions.STATE_READER_MODE.key(),
- (windowType == null
- ?
SavepointConnectorOptions.StateReaderMode.KEYED
- :
SavepointConnectorOptions.StateReaderMode.WINDOWED)
- .toString());
+ if (windowType != null) {
+ options.put(
+ SavepointConnectorOptions.STATE_READER_MODE.key(),
+
SavepointConnectorOptions.StateReaderMode.WINDOWED.toString());
+ }
Review Comment:
I fixed this, good catch
--
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]