Skip to content

Commit

Permalink
Add comment about why it is ok to return boolean with catchall match
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Aug 8, 2024
1 parent 268efcd commit ead4a7c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions datafusion/functions/src/regex/regexplike.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ impl ScalarUDFImpl for RegexpLikeFunc {

Ok(match &arg_types[0] {
Null => Null,
// Type coercion is done by DataFusion based on signature, so if we
// get here, the first argument is always a string
_ => Boolean,
})
}
Expand Down

0 comments on commit ead4a7c

Please sign in to comment.