igalshilman 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_r376806866
########## File path: statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/state/MultiplexedState.java ########## @@ -65,6 +67,19 @@ public MultiplexedState( return new MultiplexedMapStateAccessor<>(sharedMapStateHandle, uniqueSubKey, valueSerializer); } + @Override + public <K, V> TableAccessor<K, V> createFlinkStateTableAccessor( + FunctionType functionType, PersistedTable<K, V> persistedTable) { + final MultiplexedStateKey uniqueSubKeyPrefix = + multiplexedSubstateKey(functionType, persistedTable.name()); + final TypeSerializer<K> keySerializer = + types.registerType(persistedTable.keyType()).createSerializer(executionConfiguration); + final TypeSerializer<V> valueSerializer = + types.registerType(persistedTable.valueType()).createSerializer(executionConfiguration); + return new MultiplexedTableStateAccessor<>( + sharedMapStateHandle, uniqueSubKeyPrefix, keySerializer, valueSerializer); Review comment: Hi @tzulitai, I am hesitant to add another state handle without a clear benefit mainly because of the memory requirements associated with it. We Currently have: * async operations state * delayed operations * persisted values * there would be another ListState coming for multi-language This already requires 512MB out of the box, so I'd be carful of adding another without a clear advantage. Ideally the core limitation at Flink would be addressed so we won't have to multiplex state at all. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services