Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
comphead committed Aug 1, 2023
1 parent 658e153 commit 56a4685
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion datafusion/common/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ macro_rules! make_error {
};
}

// DataFusionError::Plan
// Exposes a macro to create `DataFusionError::Plan`
make_error!(plan_err, Plan);

#[cfg(test)]
Expand Down
4 changes: 2 additions & 2 deletions datafusion/expr/src/type_coercion/aggregates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ pub fn coerce_types(
}
AggregateFunction::Correlation => {
if !is_correlation_support_arg_type(&input_types[0]) {
return Err(DataFusionError::Plan(format!(
return plan_err!(
"The function {:?} does not support inputs of type {:?}.",
agg_fun,
input_types[0]
Expand All @@ -197,7 +197,7 @@ pub fn coerce_types(
let input_types_valid = // number of input already checked before
valid_types.contains(&input_types[0]) && valid_types.contains(&input_types[1]);
if !input_types_valid {
return Err(DataFusionError::Plan(format!(
return plan_err!(
"The function {:?} does not support inputs of type {:?}.",
agg_fun,
input_types[0]
Expand Down

0 comments on commit 56a4685

Please sign in to comment.