yjhjstz commented on code in PR #1207: URL: https://github.com/apache/cloudberry/pull/1207#discussion_r2190315936
########## src/backend/executor/nodeHash.c: ########## @@ -4190,8 +4192,21 @@ PushdownRuntimeFilter(HashState *node) scankeys = lappend(scankeys, sk); /* append new runtime filters to target node */ - SeqScanState *sss = castNode(SeqScanState, attr_filter->target); - sss->filters = list_concat(sss->filters, scankeys); + if (IsA(attr_filter->target, SeqScanState)) + { + SeqScanState *sss = castNode(SeqScanState, attr_filter->target); + sss->filters = list_concat(sss->filters, scankeys); + } + else if (IsA(attr_filter->target, DynamicSeqScanState)) + { + DynamicSeqScanState *dsss = castNode(DynamicSeqScanState, attr_filter->target); + dsss->filters = list_concat(dsss->filters, scankeys); + } + else + { + /* never reach here */ + Assert(false); Review Comment: use `pg_unreachable()` ? ########## src/backend/executor/nodeHash.c: ########## @@ -4268,6 +4284,20 @@ ResetRuntimeFilter(HashState *node) sss->filters = NIL; } } + else if (IsA(attr_filter->target, DynamicSeqScanState)) + { + dsss = castNode(DynamicSeqScanState, attr_filter->target); + if (dsss->filters) + { + list_free_deep(dsss->filters); + dsss->filters = NIL; + } + } + else + { + /* never reach here */ + Assert(false); Review Comment: use `pg_unreachable()` ? -- 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: commits-unsubscr...@cloudberry.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org For additional commands, e-mail: commits-h...@cloudberry.apache.org