code: func (c *Column) HandleBadNull(d types.Datum, sc *stmtctx.StatementContext) (types.Datum, error) {
  	if err := c.CheckNotNull(d); err != nil {
  		if sc.BadNullAsWarning {
  			sc.AppendWarning(err)
  			return GetZeroValue(c.ToInfo()), nil
  		}
  		return types.Datum{}, err
  	}
  	return d, nil
  }
docs: // HandleBadNull handles the bad null error.
  // If BadNullAsWarning is true, it will append the error as a warning, else return the error.