diff --git a/src/expr/macro/src/gen.rs b/src/expr/macro/src/gen.rs index add26829b71e3..257da1ed62ee0 100644 --- a/src/expr/macro/src/gen.rs +++ b/src/expr/macro/src/gen.rs @@ -219,7 +219,7 @@ impl FunctionAttr { }; // evaluate child expressions and - // - build a chunk if arguments are varibale + // - build a chunk if arguments are variable // - downcast arrays if arguments are fixed let eval_children = if varargs { quote! { @@ -238,7 +238,7 @@ impl FunctionAttr { } }; // evaluate child expressions and - // - build a row if arguments are varibale + // - build a row if arguments are variable // - downcast scalars if arguments are fixed let eval_row_children = if varargs { quote! { diff --git a/src/expr/src/sig/func.rs b/src/expr/src/sig/func.rs index e18301f5bc942..1dcc0708ab8c5 100644 --- a/src/expr/src/sig/func.rs +++ b/src/expr/src/sig/func.rs @@ -128,11 +128,10 @@ mod tests { // convert FUNC_SIG_MAP to a more convenient map for testing let mut new_map: BTreeMap, Vec>> = BTreeMap::new(); - for ((func, num_args), sigs) in &FUNC_SIG_MAP.0 { + for (func, sigs) in &FUNC_SIG_MAP.0 { for sig in sigs { // validate the FUNC_SIG_MAP is consistent assert_eq!(func, &sig.func); - assert_eq!(num_args, &sig.inputs_type.len()); // exclude deprecated functions if sig.deprecated { continue; diff --git a/src/expr/src/vector_op/concat_ws.rs b/src/expr/src/vector_op/concat_ws.rs index 4528ca29d672a..5fa6a542a7c74 100644 --- a/src/expr/src/vector_op/concat_ws.rs +++ b/src/expr/src/vector_op/concat_ws.rs @@ -45,6 +45,7 @@ mod tests { use risingwave_common::row::Row; use risingwave_common::test_prelude::DataChunkTestExt; use risingwave_common::types::ToOwnedDatum; + use risingwave_common::util::iter_util::ZipEqDebug; use crate::expr::build_from_pretty; @@ -67,7 +68,7 @@ mod tests { assert_eq!(&output, expected.column_at(0)); // test eval_row - for (row, expected) in input.rows().zip(expected.rows()) { + for (row, expected) in input.rows().zip_eq_debug(expected.rows()) { let result = concat_ws.eval_row(&row.to_owned_row()).await.unwrap(); assert_eq!(result, expected.datum_at(0).to_owned_datum()); } diff --git a/src/expr/src/vector_op/format.rs b/src/expr/src/vector_op/format.rs index 31d746bdeb213..a107a29a6c456 100644 --- a/src/expr/src/vector_op/format.rs +++ b/src/expr/src/vector_op/format.rs @@ -168,6 +168,7 @@ mod tests { use risingwave_common::row::Row; use risingwave_common::test_prelude::DataChunkTestExt; use risingwave_common::types::ToOwnedDatum; + use risingwave_common::util::iter_util::ZipEqDebug; use crate::expr::build_from_pretty; @@ -178,7 +179,7 @@ mod tests { "T T T T Hello%s World . HelloWorld %s%s Hello World HelloWorld - %I && \"%%\" + %I && . \"&&\" . a b .", ) .split_column_at(3); @@ -188,7 +189,7 @@ mod tests { assert_eq!(&output, expected.column_at(0)); // test eval_row - for (row, expected) in input.rows().zip(expected.rows()) { + for (row, expected) in input.rows().zip_eq_debug(expected.rows()) { let result = format.eval_row(&row.to_owned_row()).await.unwrap(); assert_eq!(result, expected.datum_at(0).to_owned_datum()); } diff --git a/src/frontend/src/expr/type_inference/func.rs b/src/frontend/src/expr/type_inference/func.rs index 64e7dda9c4c96..27afd5db420fa 100644 --- a/src/frontend/src/expr/type_inference/func.rs +++ b/src/frontend/src/expr/type_inference/func.rs @@ -1183,6 +1183,7 @@ mod tests { sig_map.insert(FuncSign { func: DUMMY_FUNC, inputs_type: formals, + varargs: false, ret_type: DUMMY_RET, build: |_, _| unreachable!(), deprecated: false,