diff --git a/datafusion/common/src/config.rs b/datafusion/common/src/config.rs index 8d2742aaafe5..33a90017bd7e 100644 --- a/datafusion/common/src/config.rs +++ b/datafusion/common/src/config.rs @@ -1365,8 +1365,7 @@ impl TableOptions { /// A new `TableOptions` instance with settings applied from the session config. pub fn default_from_session_config(config: &ConfigOptions) -> Self { let initial = TableOptions::default(); - initial.combine_with_session_config(config); - initial + initial.combine_with_session_config(config) } /// Updates the current `TableOptions` with settings from a given session config. @@ -1378,6 +1377,7 @@ impl TableOptions { /// # Returns /// /// A new `TableOptions` instance with updated settings from the session config. + #[must_use = "this method returns a new instance"] pub fn combine_with_session_config(&self, config: &ConfigOptions) -> Self { let mut clone = self.clone(); clone.parquet.global = config.execution.parquet.clone();