Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <[email protected]>
  • Loading branch information
wangrunji0408 committed Jul 9, 2024
1 parent a513343 commit 28c8696
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/expr/core/src/aggregate/def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl FromStr for AggKind {

impl From<PbAggKind> for AggKind {
fn from(pb: PbAggKind) -> Self {
assert!(matches!(
assert!(!matches!(
pb,
PbAggKind::Unspecified | PbAggKind::UserDefined | PbAggKind::WrapScalar
));
Expand Down Expand Up @@ -283,7 +283,7 @@ impl AggKind {

pub fn to_protobuf(&self) -> PbAggKind {
match self {
Self::Builtin(pb) => pb.clone(),
Self::Builtin(pb) => *pb,
Self::UserDefined(_) => PbAggKind::UserDefined,
Self::WrapScalar(_) => PbAggKind::WrapScalar,
}
Expand Down
2 changes: 1 addition & 1 deletion src/expr/core/src/aggregate/user_defined.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ pub fn new_user_defined(
));

Ok(Box::new(UserDefinedAggregateFunction {
return_field: arrow_convert.to_arrow_field("", &return_type)?,
return_field: arrow_convert.to_arrow_field("", return_type)?,
state_field: Field::new("state", arrow_schema::DataType::Binary, true),
return_type: return_type.clone(),
arg_schema,
Expand Down

0 comments on commit 28c8696

Please sign in to comment.