Skip to content

Commit

Permalink
fix concat_op
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <[email protected]>
  • Loading branch information
wangrunji0408 committed Sep 8, 2023
1 parent c2de14a commit db92f82
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/frontend/src/expr/type_inference/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@ fn infer_type_for_special(
.try_collect()?;
Ok(Some(DataType::Varchar))
}
ExprType::ConcatOp => {
let inputs_owned = std::mem::take(inputs);
*inputs = inputs_owned
.into_iter()
.map(|input| input.cast_explicit(DataType::Varchar))
.try_collect()?;
Ok(Some(DataType::Varchar))
}
ExprType::Format => {
ensure_arity!("format", 1 <= | inputs |);
let inputs_owned = std::mem::take(inputs);
Expand Down

0 comments on commit db92f82

Please sign in to comment.