jerry-024 commented on code in PR #760:
URL: https://github.com/apache/paimon-rust/pull/760#discussion_r3892918918
##########
crates/integrations/datafusion/src/lateral_vector_search.rs:
##########
@@ -352,9 +450,54 @@ struct LateralVectorSearchExec {
query_vector_expr: Arc<dyn PhysicalExpr>,
limit: usize,
output_schema: ArrowSchemaRef,
+ filter: Option<Predicate>,
+ prepared_filter_cache: Arc<ExecutionPreparedFilterCache>,
plan_properties: Arc<PlanProperties>,
}
+#[derive(Debug)]
+struct ExecutionPreparedFilterEntry {
+ context: Weak<TaskContext>,
+ prepared_filter: Arc<OnceCell<PreparedVectorSearchFilter>>,
Review Comment:
[P1] Release prepared filters when their execution ends
This cache entry owns the OnceCell strongly, but the dead TaskContext only
makes context non-upgradeable; the entry is removed only if a later execution
calls for_execution. After the final use of a reusable physical plan, the last
scalar-filter bitmap (and its pinned table state) therefore remains reachable
for the plan's lifetime, which can retain a very large RoaringTreemap. Please
tie the value to the TaskContext lifecycle or evict this exact entry when that
execution completes.
--
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]