code: func (e *InsertValues) insertRows(ctx context.Context, exec func(ctx context.Context, rows [][]types.Datum) error) (err error) {
  	// For `insert|replace into set x=y`, process the set list here.
  	if err = e.processSetList(); err != nil {
  		return err
  	}
  	sessVars := e.ctx.GetSessionVars()
  	batchInsert := sessVars.BatchInsert && !sessVars.InTxn()
  	batchSize := sessVars.DMLBatchSize
  
  	rows := make([][]types.Datum, 0, len(e.Lists))
  	for i, list := range e.Lists {
  		e.rowCount++
  		row, err := e.evalRow(list, i)
  		if err != nil {
  			return err
  		}
  		rows = append(rows, row)
  		if batchInsert && e.rowCount%uint64(batchSize) == 0 {
  			if err = exec(ctx, rows); err != nil {
  				return err
  			}
  			rows = rows[:0]
  			if err = e.doBatchInsert(ctx); err != nil {
  				return err
  			}
  		}
  	}
  	return exec(ctx, rows)
  }
docs: // insertRows processes `insert|replace into values ()` or `insert|replace into set x=y`