Maria Sharapova has advanced to the final of the WTA tournament in Indian Wells, after Ana Ivanovic retired from their semi-final through injury.