gabotechs commented on issue #21650: URL: https://github.com/apache/datafusion/issues/21650#issuecomment-4258725435
`TaskContext` indeed sounds like a natural place for holding the shared state. I can imagine some pending things that can probably be easily addressed: - Some entities need to access shared state but have no access to `TaskContext`. For example, `DynamicFilterPhysicalExpr`, as a `PhysicalExpr` implementation, has no access to `TaskContext` (see [PhysicalExpr::evaluate](https://github.com/apache/datafusion/blob/5c653bee5da64003915f6dfeb3da15759b091a8d/datafusion/physical-expr-common/src/physical_expr.rs#L87-L87)) - `TaskContext` is not mutable, so representing shared state with structs like a `HashMap` implies that all entities that require shared state are registered prior to building the `TaskContext` itself, rather than lazily at runtime. This might not be a problem 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
