Skip to content

Commit

Permalink
Fix combine with session config (#14139)
Browse files Browse the repository at this point in the history
* fix combine with session config

* must use it
  • Loading branch information
XiangpengHao authored Jan 16, 2025
1 parent d42b994 commit 04b6d4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datafusion/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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();
Expand Down

0 comments on commit 04b6d4d

Please sign in to comment.