code: func BuildCastFunction4Union(ctx sessionctx.Context, expr Expression, tp *types.FieldType) (res Expression) {
  	ctx.SetValue(inUnionCastContext, struct{}{})
  	defer func() {
  		ctx.SetValue(inUnionCastContext, nil)
  	}()
  	return BuildCastFunction(ctx, expr, tp)
  }
docs: // BuildCastFunction4Union build a implicitly CAST ScalarFunction from the Union
  // Expression.