Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Zhan <jayzhan211@gmail.com>
  • Loading branch information
jayzhan211 committed Jan 14, 2025
1 parent 9a95659 commit 9320f34
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ use datafusion_common::cast::{as_float64_array, as_int32_array};
use datafusion_common::tree_node::{Transformed, TreeNode};
use datafusion_common::{
assert_batches_eq, assert_batches_sorted_eq, assert_contains, exec_err, internal_err,
not_impl_err, plan_err, DFSchema, DataFusionError, HashMap, Result,
ScalarValue,
not_impl_err, plan_err, DFSchema, DataFusionError, HashMap, Result, ScalarValue,
};
use datafusion_expr::simplify::{ExprSimplifyResult, SimplifyInfo};
use datafusion_expr::{
Accumulator, ColumnarValue, CreateFunction, CreateFunctionBody, LogicalPlanBuilder, OperateFunctionArg, ReturnInfo, ReturnTypeArgs, ScalarUDF, ScalarUDFImpl, Signature, Volatility
Accumulator, ColumnarValue, CreateFunction, CreateFunctionBody, LogicalPlanBuilder,
OperateFunctionArg, ReturnInfo, ReturnTypeArgs, ScalarUDF, ScalarUDFImpl, Signature,
Volatility,
};
use datafusion_functions_nested::range::range_udf;
use parking_lot::Mutex;
Expand Down Expand Up @@ -817,10 +818,7 @@ impl ScalarUDFImpl for TakeUDF {
///
/// 1. If the third argument is '0', return the type of the first argument
/// 2. If the third argument is '1', return the type of the second argument
fn return_type_from_args(
&self,
args: ReturnTypeArgs,
) -> Result<ReturnInfo> {
fn return_type_from_args(&self, args: ReturnTypeArgs) -> Result<ReturnInfo> {
if args.arg_types.len() != 3 {
return plan_err!("Expected 3 arguments, got {}.", args.arg_types.len());
}
Expand All @@ -840,7 +838,9 @@ impl ScalarUDFImpl for TakeUDF {
);
};

Ok(ReturnInfo::new_nullable(args.arg_types[take_idx].to_owned()))
Ok(ReturnInfo::new_nullable(
args.arg_types[take_idx].to_owned(),
))
}

// The actual implementation
Expand Down

0 comments on commit 9320f34

Please sign in to comment.