Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions datafusion/execution/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,11 @@ impl SessionConfig {
self.options.execution.enforce_batch_size_in_joins
}

pub fn with_enable_ansi_mode(mut self, enable_ansi_mode: bool) -> Self {
self.options_mut().execution.enable_ansi_mode = enable_ansi_mode;
self
}

/// Convert configuration options to name-value pairs with values
/// converted to strings.
///
Expand Down
4 changes: 3 additions & 1 deletion datafusion/functions/src/math/abs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ macro_rules! make_abs_function {
}};
}

#[macro_export]
macro_rules! make_try_abs_function {
($ARRAY_TYPE:ident) => {{
|input: &ArrayRef| {
Expand All @@ -62,7 +63,8 @@ macro_rules! make_try_abs_function {
x
))
})
})?;
})
.and_then(|v| Ok(v.with_data_type(input.data_type().clone())))?; // maintain decimal's precision and scale
Ok(Arc::new(res) as ArrayRef)
}
}};
Expand Down
Loading
Loading