Skip to content

Commit

Permalink
Update expression/builtin_cast.go
Browse files Browse the repository at this point in the history
Co-authored-by: wjHuang <huangwenjun1997@gmail.com>
  • Loading branch information
xiongjiwei and wjhuang2016 committed Dec 9, 2021
1 parent a87c92d commit c556fcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion expression/builtin_cast.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func (c *castAsStringFunctionClass) getFunction(ctx sessionctx.Context, args []E
}
bf.tp = c.tp
if args[0].GetType().Hybrid() || IsBinaryLiteral(args[0]) {
// when cast from binary to some other charsets, we should check if the binary is valid or not.
// When cast from binary to some other charsets, we should check if the binary is valid or not.
// so we build a from_binary function to do this check.
ft := args[0].GetType().Clone()
ft.Charset, ft.Collate = c.tp.Charset, c.tp.Collate
Expand Down

0 comments on commit c556fcb

Please sign in to comment.