diff --git a/src/daft-connect/src/translation/expr/unresolved_function.rs b/src/daft-connect/src/translation/expr/unresolved_function.rs index ee435fcb1f..1742984922 100644 --- a/src/daft-connect/src/translation/expr/unresolved_function.rs +++ b/src/daft-connect/src/translation/expr/unresolved_function.rs @@ -50,7 +50,8 @@ pub fn handle_sum(arguments: Vec) -> eyre::Result) -> eyre::Result { +/// If the arguments are exactly one, return it. Otherwise, return an error. +pub fn to_single(arguments: Vec) -> eyre::Result { let arguments: [daft_dsl::ExprRef; 1] = match arguments.try_into() { Ok(arguments) => arguments, Err(arguments) => { @@ -64,7 +65,7 @@ pub fn one(arguments: Vec) -> eyre::Result } pub fn not(arguments: Vec) -> eyre::Result { - let arg = one(arguments)?; + let arg = to_single(arguments)?; Ok(arg.not()) }