code: func checkForNullValue(ctx sessionctx.Context, isDataTruncated bool, schema, table, oldCol, newCol model.CIStr) error {
  	sql := fmt.Sprintf("select count(*) from `%s`.`%s` where `%s` is null limit 1;", schema.L, table.L, oldCol.L)
  	rows, _, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql)
  	if err != nil {
  		return errors.Trace(err)
  	}
  	rowCount := rows[0].GetInt64(0)
  	if rowCount != 0 {
  		if isDataTruncated {
  			return errInvalidUseOfNull
  		}
  		return ErrWarnDataTruncated.GenWithStackByArgs(newCol.L, rowCount)
  	}
  	return nil
  }
docs: // checkForNullValue ensure there are no null values of the column of this table.
  // `isDataTruncated` indicates whether the new field and the old field type are the same, in order to be compatible with mysql.