tzulitai commented on a change in pull request #17: [FLINK-15954] Add a
PersistedTable to the SDK
URL: https://github.com/apache/flink-statefun/pull/17#discussion_r376679262
##########
File path:
statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/state/StateBinder.java
##########
@@ -36,13 +39,34 @@ public StateBinder(@Label("state") State state) {
}
public BoundState bind(FunctionType functionType, @Nullable Object instance)
{
- List<PersistedValue<Object>> values =
PersistedValues.findReflectively(instance);
-
- for (PersistedValue<Object> persistedValue : values) {
- Accessor<Object> accessor = state.createFlinkStateAccessor(functionType,
persistedValue);
- ApiExtension.setPersistedValueAccessor(persistedValue, accessor);
+ List<?> values = PersistedValues.findReflectively(instance);
Review comment:
Please rename the variable `values` and the class `PersistedValues` to
probably `PersistedStates`, since the class now handles not only values but
tables as well.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services