kosiew commented on code in PR #17021: URL: https://github.com/apache/datafusion/pull/17021#discussion_r2290687827
########## datafusion-cli/src/cli_context.rs: ########## @@ -93,6 +116,120 @@ impl CliSessionContext for SessionContext { &self, plan: LogicalPlan, ) -> Result<DataFrame, DataFusionError> { - self.execute_logical_plan(plan).await + SessionContext::execute_logical_plan(self, plan).await + } +} + +/// Session context used by the CLI with memory profiling support. +pub struct ReplSessionContext { + ctx: SessionContext, + memory_profiling: AtomicBool, + tracked_memory_pool: Option<Arc<dyn TrackedPool>>, +} + +impl ReplSessionContext { + pub fn new( + ctx: SessionContext, + base_memory_pool: Arc<dyn MemoryPool>, + top_memory_consumers: usize, + ) -> Self { + let tracked_memory_pool = if top_memory_consumers > 0 { Review Comment: Changed implementation -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org