title: SaveMode is not working in Spark SQL
body: <p>I was running Spark SQL example with SaveMode option but getting following error.</p>
  
  <pre><code>val df = sqlContext.read.format("json").load("/user/root/spark/data/people.json")
  df.select("name","age").write.format("json").save("Output",SaveMode.ErrorIfExist)
  
  
  &lt;console&gt;:35: error: overloaded method value save with alternatives:
    ()Unit &lt;and&gt;
    (path: String)Unit
   cannot be applied to (String, org.apache.spark.sql.SaveMode)
                df.select("name", "age").write.format("json").save("Output",SaveMode.ErrorIfExists
  </code></pre>
  
  <p>I checked documentation , it says SaveMode is deprecated. How do I fix this?</p>
  
  <p>Any suggestion.</p>