Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <wangrunji0408@163.com>
  • Loading branch information
wangrunji0408 committed Sep 8, 2023
1 parent 044df9b commit 11539d8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/expr/macro/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,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! {
Expand All @@ -241,7 +241,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! {
Expand Down
3 changes: 2 additions & 1 deletion src/expr/src/vector_op/coalesce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,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;

Expand All @@ -52,7 +53,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 = coalesce.eval_row(&row.to_owned_row()).await.unwrap();
assert_eq!(result, expected.datum_at(0).to_owned_datum());
}
Expand Down
3 changes: 2 additions & 1 deletion src/expr/src/vector_op/concat_ws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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());
}
Expand Down
5 changes: 3 additions & 2 deletions src/expr/src/vector_op/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
Expand All @@ -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());
}
Expand Down
1 change: 1 addition & 0 deletions src/frontend/src/expr/type_inference/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 11539d8

Please sign in to comment.