milenkovicm commented on code in PR #17314: URL: https://github.com/apache/datafusion/pull/17314#discussion_r2301349185
########## datafusion/core/src/dataframe/mod.rs: ########## @@ -232,19 +242,31 @@ pub struct DataFrame { projection_requires_validation: bool, } -impl DataFrame { - /// Create a new `DataFrame ` based on an existing `LogicalPlan` - /// - /// This is a low-level method and is not typically used by end users. See - /// [`SessionContext::read_csv`] and other methods for creating a - /// `DataFrame` from an existing datasource. - pub fn new(session_state: SessionState, plan: LogicalPlan) -> Self { - Self { - session_state: Box::new(session_state), - plan, - projection_requires_validation: true, - } +pub async fn cache(self) -> Result<DataFrame> { + if self.session_state.config.local_cache { Review Comment: this should come from configuration option -- 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