You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/11/20 02:26:13 UTC

[GitHub] [flink] leonardBang commented on a change in pull request #11830: [FLINK-17096] [table] Mini-batch group aggregation doesn't expire state even if state ttl is enabled

leonardBang commented on a change in pull request #11830:
URL: https://github.com/apache/flink/pull/11830#discussion_r527353379



##########
File path: flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/dataview/StateListView.java
##########
@@ -76,7 +77,14 @@ public void addAll(List<EE> list) throws Exception {
 
 	@Override
 	public boolean remove(EE value) throws Exception {
-		List<EE> list = (List<EE>) getListState().get();
+		// the getListState().get() not always returns List object
+		// copy values to ArrayList for removing
+		Iterator<EE> iterator = getListState().get().iterator();

Review comment:
       `getListState().get()` may return null object, add a null check?




----------------------------------------------------------------
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:
users@infra.apache.org